increase waiting timeout from 5/10 to 30 seconds#635
Open
bdrung wants to merge 2 commits into
Open
Conversation
Some tests run into the waiting timeout on the slow and emulated riscv64
architecture, for example:
```
=================================== FAILURES ===================================
__________________________ T.test_crash_system_slice ___________________________
self = <tests.system.test_signal_crashes.T testMethod=test_crash_system_slice>
@unittest.skipIf(
get_init_system() != "systemd", "running init system is not systemd"
)
@skip_if_command_is_missing("systemd-run")
@unittest.skipIf(os.geteuid() != 0, "this test needs to be run as root")
def test_crash_system_slice(self) -> None:
"""Report generation for a protected process running in the system
slice"""
apport.fileutils.report_dir = self.orig_report_dir
self.test_report = os.path.join(
apport.fileutils.report_dir,
f"{self.TEST_EXECUTABLE.replace('/', '_')}.{os.getuid()}.crash",
)
system_run = self.create_test_process(
command="/usr/bin/systemd-run",
args=[
"-t",
"-q",
"--slice=system.slice",
"-p",
"ProtectSystem=true",
self.TEST_EXECUTABLE,
]
+ self.TEST_ARGS,
)
try:
sleep_pid = wait_for_process_to_appear(
self.TEST_EXECUTABLE, self.running_test_executables
)
wait_for_sleeping_state(sleep_pid)
os.kill(sleep_pid, signal.SIGSEGV)
> self.wait_for_no_instance_running(self.TEST_EXECUTABLE)
/tmp/autopkgtest.RQrDHF/autopkgtest_tmp/tests/system/test_signal_crashes.py:261:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/tmp/autopkgtest.RQrDHF/autopkgtest_tmp/tests/system/test_signal_crashes.py:350: in wait_for_no_instance_running
self.fail(f"Timeout exceeded, but {program} is still running.")
E AssertionError: Timeout exceeded, but /usr/bin/gnusleep is still running.
```
So increase the waiting timeout from 5 and 10 seconds to 30 seconds.
There are multiple waiting functions but all have different conditions
to wait for. Therefore is no easy way to unify them (while keeping them
simple).
Bug: https://launchpad.net/bugs/2159030
GitHub might be slow or the system might be slow (like riscv64) and therefore a five seconds timeout might not be enough. Bug: https://launchpad.net/bugs/2159030
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #635 +/- ##
==========================================
- Coverage 84.47% 84.46% -0.01%
==========================================
Files 106 106
Lines 21053 21055 +2
Branches 3223 3223
==========================================
+ Hits 17784 17785 +1
- Misses 2792 2793 +1
Partials 477 477 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
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.
Some tests run into the waiting timeout on the slow and emulated riscv64 architecture, for example:
So increase the waiting timeout from 5 and 10 seconds to 30 seconds.
There are multiple waiting functions but all have different conditions to wait for. Therefore is no easy way to unify them (while keeping them simple).
Bug: https://launchpad.net/bugs/2159030