Skip to content

start_time/end_time reflects only the last execution segment for tests with reboots #4916

Description

@bgoncalv

Summary

For tests that use tmt-reboot or restart_on_exit_code, the start_time and
end_time fields on the result are silently overwritten on each re-execution of
the test. The final values reflect only the last execution segment (after the
final reboot/restart), not the original start of the test.

Root cause

In tmt/steps/execute/internal.py, the _run_tests loop reuses the same
TestInvocation object across reboots/restarts (via continue without
incrementing the index). Each call to invoke_test() runs a new Stopwatch
and unconditionally overwrites self.start_time and self.end_time on the
invocation:

self.start_time = timer.start_time_formatted
self.end_time = timer.end_time_formatted

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area | resultsRelated to how tmt stores and shares resultsbugSomething isn't workingstep | executeStuff related to the execute step

Type

Projects

  • Status
    review
  • Status
    triaged

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions