Add wait buffer after reboot/suspend stress tests (bugfix)#1981
Merged
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1981 +/- ##
==========================================
+ Coverage 50.60% 50.85% +0.24%
==========================================
Files 384 386 +2
Lines 41180 41418 +238
Branches 7636 7689 +53
==========================================
+ Hits 20841 21062 +221
- Misses 19594 19602 +8
- Partials 745 754 +9
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
02b243f to
9e4dd70
Compare
The script mimics bin/suspend.sh, but adds a `--wait` optional argument that can be used to wait for the device to be fully initialized. Since it's a Python script, unit tests are added. Also modify bin/fwts_test.py so that the main function can be called with arguments, since this is what is done from the new bin/suspend_trigger.py script.
Use the new Python script, with `--wait` option when it's the first suspend cycle after a reboot, since this is when the device is initializing. Some components (WWAN modules for instance) may take up to 2 minutes to fully initialize after a reboot, so the script waits for this. (It also didn't make sense for a device to be suspended *riught* after being rebooted) Remove suspend.sh script as it's not used anymore. Fix CHECKBOX-1918
4c2e84f to
c6120f5
Compare
Hook25
requested changes
Jul 3, 2025
Collaborator
Hook25
left a comment
There was a problem hiding this comment.
Fantastic, this is way better than the bash version!
Please use check_call instead of check_output, saves you a bit of troubles, also consider the stuff about envvars. I know it was already that way, but still
Hook25
approved these changes
Jul 16, 2025
mreed8855
pushed a commit
that referenced
this pull request
Jul 30, 2025
* Add suspend trigger Python script The script mimics bin/suspend.sh, but adds a `--wait` optional argument that can be used to wait for the device to be fully initialized. Since it's a Python script, unit tests are added. Also modify bin/fwts_test.py so that the main function can be called with arguments, since this is what is done from the new bin/suspend_trigger.py script. * Update jobs Use the new Python script, with `--wait` option when it's the first suspend cycle after a reboot, since this is when the device is initializing. Some components (WWAN modules for instance) may take up to 2 minutes to fully initialize after a reboot, so the script waits for this. (It also didn't make sense for a device to be suspended *riught* after being rebooted) Remove suspend.sh script as it's not used anymore. Fix CHECKBOX-1918 * Fix unit tests for Python 3.5 * Use check_call instead of check_output * Use script arguments instead of envvars * Adjust unit tests accordingly * Call Checkbox jobs with arguments * black <3 flake8 * Fix unit tests to work with py3.5
mreed8855
pushed a commit
that referenced
this pull request
Jul 31, 2025
* Add suspend trigger Python script The script mimics bin/suspend.sh, but adds a `--wait` optional argument that can be used to wait for the device to be fully initialized. Since it's a Python script, unit tests are added. Also modify bin/fwts_test.py so that the main function can be called with arguments, since this is what is done from the new bin/suspend_trigger.py script. * Update jobs Use the new Python script, with `--wait` option when it's the first suspend cycle after a reboot, since this is when the device is initializing. Some components (WWAN modules for instance) may take up to 2 minutes to fully initialize after a reboot, so the script waits for this. (It also didn't make sense for a device to be suspended *riught* after being rebooted) Remove suspend.sh script as it's not used anymore. Fix CHECKBOX-1918 * Fix unit tests for Python 3.5 * Use check_call instead of check_output * Use script arguments instead of envvars * Adjust unit tests accordingly * Call Checkbox jobs with arguments * black <3 flake8 * Fix unit tests to work with py3.5
bladernr
pushed a commit
that referenced
this pull request
Aug 28, 2025
* Add suspend trigger Python script The script mimics bin/suspend.sh, but adds a `--wait` optional argument that can be used to wait for the device to be fully initialized. Since it's a Python script, unit tests are added. Also modify bin/fwts_test.py so that the main function can be called with arguments, since this is what is done from the new bin/suspend_trigger.py script. * Update jobs Use the new Python script, with `--wait` option when it's the first suspend cycle after a reboot, since this is when the device is initializing. Some components (WWAN modules for instance) may take up to 2 minutes to fully initialize after a reboot, so the script waits for this. (It also didn't make sense for a device to be suspended *riught* after being rebooted) Remove suspend.sh script as it's not used anymore. Fix CHECKBOX-1918 * Fix unit tests for Python 3.5 * Use check_call instead of check_output * Use script arguments instead of envvars * Adjust unit tests accordingly * Call Checkbox jobs with arguments * black <3 flake8 * Fix unit tests to work with py3.5
stanley31huang
pushed a commit
that referenced
this pull request
Oct 3, 2025
* Add suspend trigger Python script The script mimics bin/suspend.sh, but adds a `--wait` optional argument that can be used to wait for the device to be fully initialized. Since it's a Python script, unit tests are added. Also modify bin/fwts_test.py so that the main function can be called with arguments, since this is what is done from the new bin/suspend_trigger.py script. * Update jobs Use the new Python script, with `--wait` option when it's the first suspend cycle after a reboot, since this is when the device is initializing. Some components (WWAN modules for instance) may take up to 2 minutes to fully initialize after a reboot, so the script waits for this. (It also didn't make sense for a device to be suspended *riught* after being rebooted) Remove suspend.sh script as it's not used anymore. Fix CHECKBOX-1918 * Fix unit tests for Python 3.5 * Use check_call instead of check_output * Use script arguments instead of envvars * Adjust unit tests accordingly * Call Checkbox jobs with arguments * black <3 flake8 * Fix unit tests to work with py3.5
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Translate the suspend triggering Shell script into Python, and add a
--waitoption to add some waiting time before actually triggering the suspend.Some components (WWAN modules for instance) may take up to 2 minutes to
fully initialize after a reboot, so the script waits for this. (It also didn't make sense for a device to be suspended right after being rebooted)
Resolved issues
Fix CHECKBOX-1918
Documentation
Tests
https://github.com/canonical/checkbox/actions/runs/16020007949/job/45194470346
Each job run after a reboot now waits 120 seconds (or as defined by the
STRESS_S3_INIT_DELAYenv var), but not the subsequent jobs. For instance: