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

scripts: twisterlib: handlers: early QEMU timeout #72610

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 3 additions & 0 deletions scripts/pylib/twister/twisterlib/handlers.py
Original file line number Diff line number Diff line change
Expand Up @@ -879,6 +879,9 @@ def _thread(handler, timeout, outdir, logfile, fifo_fn, pid_fn,

while True:
this_timeout = int((timeout_time - time.time()) * 1000)
if timeout_extended:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For coverage testing, this can reduce the time spent

then it should be:

Suggested change
if timeout_extended:
if timeout_extended and harness.capture_coverage:

otherwise it will disable extended timeout for non-coverage 'late' output as well

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Coverage is the primary reason for this change, but non-coverage can also benefit in a minor way. Is it likely that any tests print nothing for over a second after the end of the test and then start printing more info that should be captured?

# Quit early after timeout extension if no more data is being received
this_timeout = min(this_timeout, 1000)
if this_timeout < 0 or not p.poll(this_timeout):
try:
if pid and this_timeout > 0:
Expand Down