RFR: 7903816: Improve messages in test report when a test completes after the timeout has already fired
Jaikiran Pai
jpai at openjdk.org
Mon Sep 8 02:06:09 UTC 2025
Can I please get a review of this enhancement which improves the messages in test reports when a test times out? This addresses https://bugs.openjdk.org/browse/CODETOOLS-7903816.
jtreg runs configured (or default) diagnostic commands when a test times out. It can so happen that when these commands are being run, the test may actually complete (either as a success or failure or error). When that happens, there's no clear indiciation in the jtreg report to state that the test completed when the timeout action handler's were being run. This can cause confusion because the log messages from the test itself may state that the test has completed, where as the jtreg report states that it timed out.
The change in this PR improves this reporting by including additional text to state that the test's original status has been suppressed in preference for the timed out status. This new message will be printed only if the test completed after the timeout had fired:
> result: Error. "main" action timed out with a timeout of 120 seconds on agent 2; but completed after timeout - suppressed status: "Passed. Execution successful"
(the "but completed after timeout ..." part is the new text).
Furthermore, in order to easily identify when the timeout handler(s) started and finished, a couple of new messages with a timestamp will be reported in the jtreg report:
Timeout signalled after 1 seconds
Timeout information:
[15:58:22.083] starting timeout handler action(s)
...
[15:58:22.310] timeout handler action(s) completed
--- Timeout information end.
Given the nature of this logging change, no new self test has been introduced. I have verified that existing tests pass and I've also manually verified against JDK tests that this message is indeed printed when a test completes after timing out.
-------------
Commit messages:
- 7903816: Improve messages in test report when a test completes after the timeout has already fired
Changes: https://git.openjdk.org/jtreg/pull/287/files
Webrev: https://webrevs.openjdk.org/?repo=jtreg&pr=287&range=00
Issue: https://bugs.openjdk.org/browse/CODETOOLS-7903816
Stats: 58 lines in 5 files changed: 48 ins; 0 del; 10 mod
Patch: https://git.openjdk.org/jtreg/pull/287.diff
Fetch: git fetch https://git.openjdk.org/jtreg.git pull/287/head:pull/287
PR: https://git.openjdk.org/jtreg/pull/287
More information about the jtreg-dev
mailing list