RFR: 7904153: JTReg should include crash log data in the failure node for xml reports
Christian Stein
cstein at openjdk.org
Tue Feb 17 16:09:16 UTC 2026
On Mon, 16 Feb 2026 23:25:05 GMT, William Kemper <wkemper at openjdk.org> wrote:
> The system we use (AWS CodeBuild) for running JTReg understands Junit/testNG xml files. For failed tests, it makes the text from the `failure` node easy to access from the UI. I appreciate that these xml files already have `system.err` and `system.out` nodes, but the tooling we use doesn't expose the data here (and I cannot change that tooling). Also, the current implementation takes the first section of `stderr` or `stdout`, which is often empty and comes from the `javac` portion of the test run.
src/share/classes/com/sun/javatest/regtest/report/XMLWriter.java line 185:
> 183: Section s = tr.getSection(i);
> 184: for (String x : s.getOutputNames()) {
> 185: return s.getOutput(name);
Although I do agree that this code doesn't make too much sense, especially as variable `x` is unused, but it does some work since 2012. Maybe, others do rely on this feature? ➡️ https://www.hyrumslaw.com
Did you run this against more/all JDK tests and verify that no other party, like some test output parser tool, will break?
-------------
PR Review Comment: https://git.openjdk.org/jtreg/pull/316#discussion_r2817836680
More information about the jtreg-dev
mailing list