Repository navigation
tests: exclude device setup from non-realtime deadlock timeout - #15443
Merged
Merged
Conversation
sysrsbuild-gh-agentic
left a comment
Collaborator
There was a problem hiding this comment.
Auto-generated review by rs-agentic bot 🤖
The fix is correct and well-motivated. pytest-timeout==2.2.0 is pinned so func_only=True is fully supported. One concern and one minor note below (inline).
| # func_only: keep the tight deadlock guard on the test body only -- device setup (e.g. D555 | ||
| # PoE power-on + DDS discovery takes ~17s) must not eat the budget; it has its own bounded waits | ||
| pytest.mark.timeout(20, func_only=True), | ||
| pytest.mark.context("weekly"), |
Collaborator
There was a problem hiding this comment.
func_only=True excludes both setup and teardown from the 20 s budget. Setup exclusion is the goal here, but teardown (device port-disable / re-enumeration in test_device) is now also unguarded. If teardown deadlocks, the session will hang indefinitely rather than hitting the os._exit path.
If test_device's teardown already has its own bounded waits (same as setup), this is fine — worth a quick confirmation.
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.
Overview: The non-realtime playback test's 20s deadlock timeout no longer counts device setup, so slow device power-on can't kill the whole test session.
Tracked on [RSDSO-21768]
Why
pytest.mark.timeout(20)inpytest-non-realtime.pyuses pytest-timeout's defaultfunc_only=False, so the 20s budget includes fixture setup. For DDS devices (D555), setup alone — PoE power-on + DDS discovery — takes ~17s, so the timer can fire mid-setup. Withtimeout_method="thread"(our conftest default) pytest-timeout then callsos._exit(1): the entire pytest session dies mid-run — no retry, remaining tests never run, and no junit results are written.Summary
func_only=Trueto the timeout mark: the 20s guard now covers only the test body (the DSO-15157 pipeline-stop deadlock it was written to catch).Test plan
Settings(timeout=20, func_only=True)and the test collects cleanlytest_non_realtime_stop[D555]with device recycle in setup🤖 Generated by AI