Closed eugene-yujinwu closed 2 months ago
Attention: Patch coverage is 0%
with 1 line
in your changes missing coverage. Please review.
Project coverage is 45.72%. Comparing base (
d725523
) to head (5a6aab7
). Report is 4 commits behind head on main.
Files with missing lines | Patch % | Lines |
---|---|---|
...ox-support/checkbox_support/scripts/run_watcher.py | 0.00% | 0 Missing and 1 partial :warning: |
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
@pieqq , thank you for your quick review.
Taking a look at this issue I saw that there is an error in the "insertion" condition. Explanation The line:
python Copy code if "USB Mass Storage device detected" or "uas" in line_str: does not work as intended because of the way Python evaluates conditional expressions. Here's what's happening step by step:
Expression Evaluation Order:
Python evaluates "USB Mass Storage device detected" first. Since non-empty strings are considered True in a boolean context, "USB Mass Storage device detected" evaluates to True. Therefore, the entire expression before the or operator is True.
Description
We had a usb3 gen2x1 device which used to the type-c usb3 test. But it failed to be detected by checkbox when plug in. The Bug is: The hotplug of a usb-c disk works well but com.canonical.certification::usb-c/insert test failed #1437
The reason of this issue is that the new run_watcher didn't cover this type of usb3 device.
Resolved issues
We had a usb3 gen2x1 device which used to the type-c usb3 test. But it failed to be detected by checkbox when plug in. The Bug is: The hotplug of a usb-c disk works well but com.canonical.certification::usb-c/insert test failed #1437
The reason of this issue is that the new run_watcher didn't cover this type of usb3 device.
Documentation
Tests
Run the usb3-typec insert test: ==============[ Running job 3 / 3. Estimated time left: 0:00:30 ]=============== --------[ USB 3.0 storage device insertion detected on USB Type-C port ]-------- ID: com.canonical.certification::usb-c/insert Category: com.canonical.plainbox::usb Purpose:
This test will check that the system correctly detects the insertion of a USB 3.0 storage device in a USB Type-C connector. NOTE: Make sure the USB storage device has a partition before starting the test.
Steps:
Pick an action => press ENTER to continue c => add a comment s => skip this job q => save the session and quit [csq]: ... 8< -------------------------------------------------------------------------
INSERT NOW
Timeout: 30 seconds super_speed_plus_gen2x1_usb was inserted. Controller: xhci_hcd, Number: 54 usable partition: sda1 USB3 insertion test passed. cache file usb_insert_info is at: /var/tmp/checkbox-ng/sessions/checkbox-run-2024-08-29T03.21.05.session/session-share ------------------------------------------------------------------------- >8 --- Outcome: job passed Finalizing session that hasn't been submitted anywhere: checkbox-run-2024-08-29T03.21.05 ==================================[ Results ]=================================== ☑ : Collect information about supported types of USB ☑ : Hardware Manifest ☑ : USB 3.0 storage device insertion detected on USB Type-C port
Run the usb3 insert test with usb3 gen1 disk insert: ==============[ Running job 2 / 2. Estimated time left: 0:02:00 ]=============== -----------------[ USB 3.0 storage device insertion detected ]------------------ ID: com.canonical.certification::usb3/insert Category: com.canonical.plainbox::usb Purpose:
Check system can detect insertion of a USB 3.0 storage device. NOTE: Make sure the USB storage device has a partition before starting the test.
Steps:
Pick an action => press ENTER to continue c => add a comment s => skip this job q => save the session and quit [csq]: ... 8< -------------------------------------------------------------------------
INSERT NOW
Timeout: 30 seconds super_speed_usb was inserted. Controller: xhci_hcd, Number: 53 usable partition: sda2 USB3 insertion test passed. cache file usb_insert_info is at: /var/tmp/checkbox-ng/sessions/checkbox-run-2024-08-29T02.49.03.session/session-share ------------------------------------------------------------------------- >8 --- Outcome: job passed Finalizing session that hasn't been submitted anywhere: checkbox-run-2024-08-29T02.49.03 ==================================[ Results ]=================================== ☑ : Collect information about supported types of USB ☑ : USB 3.0 storage device insertion detected