-
Notifications
You must be signed in to change notification settings - Fork 26
Fix: USBHost test results inconsistent #239
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
base: main
Are you sure you want to change the base?
Fix: USBHost test results inconsistent #239
Conversation
Resolves qualcomm-linux#228 Problem: In some platforms, during verification of 'lsusb' command, an empty character may cause false positive in the 'if' check and report test pass even though no USB devices are connected. Solution: Add additional test condition to verify output of 'lsusb' command and avoid false pass when no USB device is connected. Signed-off-by: “Aanchal <achauras@qti.qualcomm.com>
mwasilew
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.
| if [ -z "$usb_output" ] || [ "$device_count" -eq 0 ]; then | ||
| log_fail "$TESTNAME : Test Failed - No USB devices found." | ||
| echo "$TESTNAME FAIL" > "$res_file" | ||
| exit 1 |
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.
Instead of causing a failure, let's change it to SKIP with exit code 0 if there is no USB devices found
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.
hmm, isn't the goal of the test to exercise this feature?
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.
On changing the exit result to SKIP, in cases where a physically connected device does not enumerate, same test condition will be hit and it would report 'skip' instead of 'fail'. It is difficult to determine whether physically any USB devices were connected besides user input.
Is there a way we can take input parameter from user based on which we can skip certain tests?
Meanwhile I will also explore if we can determine physical connection without successful enumeration by checking port status, if that works reliably.
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.
IMHO the current version is OK. The test should not be attempted on devices that are not prepared or won't support USB. For example on RB3g2 it won't pass with current meta-qcom build due to missing firmware. I believe this is an issue of test scheduling not the test itself and I vote to keep the version in this PR.
Resolves #228
Problem: In some platforms, during verification of 'lsusb' command, an empty character may cause false positive in the 'if' check and report test pass even though no USB devices are connected.
Solution: Add additional test condition to verify output of 'lsusb' command and avoid false pass when no USB device is connected.