RFR: 8377601: JavacTemplateTestBase not reporting javac crashes
Vicente Romero
vromero at openjdk.org
Wed Feb 11 14:12:54 UTC 2026
On Tue, 10 Feb 2026 20:31:30 GMT, Chen Liang <liach at openjdk.org> wrote:
> JavacTemplateTestBase does not fail if javac crashes. A javac crash is not reflected in the diagnostics, but rather printed in System.err, which can be redirected. We should redirect that stream and ensure that stream is empty for our test cases.
>
> This test framework bug is discovered during project valhalla bworld prototype development.
test/langtools/lib/combo/tools/javac/combo/JavacTemplateTestBase.java line 248:
> 246: fm.setLocation(StandardLocation.CLASS_OUTPUT, Arrays.asList(destDir));
> 247: ct.generate();
> 248: if (!err.getBuffer().isEmpty()) {
can we remove the code duplication?
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/29659#discussion_r2793508593
More information about the compiler-dev
mailing list