Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion Runner/suites/Kernel/Baseport/USBHost/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,10 @@ echo "Enumerated USB devices..."
echo "$usb_output"

# Check if any USB devices were found
if [ "$device_count" -eq 0 ]; then
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
Copy link
Contributor

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

Copy link
Contributor

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?

Copy link
Contributor Author

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.

Copy link
Contributor

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.


elif [ "$non_hub_count" -eq 0 ]; then
log_fail "$TESTNAME : Test Failed - Only USB hubs detected, no functional USB devices."
Expand Down
Loading