-
Notifications
You must be signed in to change notification settings - Fork 59
test jack detection if is dsp d3 status - fix skip #1334
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
test jack detection if is dsp d3 status - fix skip #1334
Conversation
Fixed test skipping bug on non SDW platforms, if the usbrelay module is not installed. Signed-off-by: Artur Wilczak <arturx.wilczak@intel.com>
55c3fb9 to
f77e83c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR fixes a test skipping bug on non-SDW platforms when the usbrelay module is not installed. The changes improve the error handling logic to ensure the test properly skips when required dependencies are missing.
Key changes:
- Refactored command existence checks and execution validation to use more concise error handling patterns
- Ensured proper test skipping behavior when usbrelay is unavailable
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
|
||
| dlogi "Checking usbrelay availability..." | ||
| if ! command -v usbrelay > /dev/null; then | ||
| command -v usbrelay || { |
Copilot
AI
Nov 28, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The command -v usbrelay check will output to stdout when the command exists, which may clutter logs. The original code redirected this output to /dev/null. Consider adding > /dev/null to maintain clean output: command -v usbrelay > /dev/null || {
| command -v usbrelay || { | |
| command -v usbrelay > /dev/null || { |
|
|
||
| if ! usbrelay_switch --debug > /dev/null; then | ||
| } | ||
| usbrelay_switch --debug || { |
Copilot
AI
Nov 28, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The usbrelay_switch --debug command will output debug information to stdout/stderr when it succeeds, which may clutter logs. The original code redirected this output to /dev/null. Consider adding > /dev/null to maintain clean output: usbrelay_switch --debug > /dev/null || {
| usbrelay_switch --debug || { | |
| usbrelay_switch --debug > /dev/null || { |
redzynix
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks Artur, this fix works as intended
Fixed test skipping bug on non SDW platforms, if the usbrelay module is not installed.