canonical / checkbox

Checkbox is a testing framework used to validate device compatibility with Ubuntu Linux. It’s the testing tool developed for the purposes of the Ubuntu Certification program.
https://checkbox.readthedocs.io
GNU General Public License v3.0
33 stars 49 forks source link

Add the missing sort for lsusb in reboot_check_test.py and fix unused device comparison result (BugFix) #1607

Open tomli380576 opened 2 days ago

tomli380576 commented 2 days ago

Description

Resolved issues

  1. The original shell script had an explicit checkbox-support-lsusb | sort step that was missing in the python version. Adding this back to preserve the same behavior.
  2. Device comparison result was never updated. This becomes a problem if the only issue on the DUT is device comparison

Documentation

Tests

Unit tests

Sideloaded the fix on 202312-33267 and plugged in an USB stick during reboot to force a device difference. The fix correctly reports that the device config changed and failed the test case

codecov[bot] commented 2 days ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 48.02%. Comparing base (76d8f30) to head (edf2947). Report is 17 commits behind head on main.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #1607 +/- ## ========================================== + Coverage 48.00% 48.02% +0.02% ========================================== Files 371 371 Lines 39833 39849 +16 Branches 6730 6732 +2 ========================================== + Hits 19121 19138 +17 Misses 19994 19994 + Partials 718 717 -1 ``` | [Flag](https://app.codecov.io/gh/canonical/checkbox/pull/1607/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=canonical) | Coverage Δ | | |---|---|---| | [provider-base](https://app.codecov.io/gh/canonical/checkbox/pull/1607/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=canonical) | `24.79% <100.00%> (+0.08%)` | :arrow_up: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=canonical#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.


🚨 Try these New Features: