Skip to content
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

Fix race condition in reboot_check_test's renderer test and add lsusb/lspci timeout (BugFix) #1671

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

tomli380576
Copy link
Contributor

@tomli380576 tomli380576 commented Dec 23, 2024

Description

  • Added a method to wait for graphical.target before running unity_support_test.
  • Added timeouts for lspci and lsusb

Resolved issues

Race condition issue: #1631

There was also an issue reported by Hanhsuan where lspci and lsusb can get stuck and never return, so I added a timeout for their subprocess.run calls.

Documentation

The wait timeout can be controlled by --graphical-target-timeout <timeout_seconds>. This value is ignored when -g or --graphics are not specified. Default is 120 seconds

Tests

Unit tests

Copy link

codecov bot commented Dec 23, 2024

Codecov Report

Attention: Patch coverage is 95.45455% with 1 line in your changes missing coverage. Please review.

Project coverage is 49.02%. Comparing base (4305ba1) to head (e9aad4f).
Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
providers/base/bin/reboot_check_test.py 95.45% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1671      +/-   ##
==========================================
+ Coverage   48.99%   49.02%   +0.02%     
==========================================
  Files         372      372              
  Lines       40321    40341      +20     
  Branches     6811     6814       +3     
==========================================
+ Hits        19757    19777      +20     
  Misses      19842    19842              
  Partials      722      722              
Flag Coverage Δ
provider-base 24.89% <95.45%> (+0.09%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@tomli380576 tomli380576 force-pushed the reboot_check_race_condition branch from 344519d to 0257922 Compare December 23, 2024 06:45
@tomli380576 tomli380576 marked this pull request as ready for review December 23, 2024 07:43
@tomli380576 tomli380576 changed the title Fix race condition in reboot_check_test's renderer test (BugFix) Fix race condition in reboot_check_test's renderer test and add lsusb/lspci timeout (BugFix) Dec 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant