RFR: 8377601: JavacTemplateTestBase not reporting javac crashes [v2]

Vicente Romero vromero at openjdk.org
Wed Feb 11 17:21:47 UTC 2026


On Wed, 11 Feb 2026 16:32:00 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.
>
> Chen Liang has updated the pull request incrementally with two additional commits since the last revision:
> 
>  - Redundant import
>  - Simplified the logic - ct.generate throws already

lgtm

test/langtools/lib/combo/tools/javac/combo/JavacTemplateTestBase.java line 249:

> 247:                 destDir = nullDir;
> 248:             }
> 249:             ct.generate(); // throws ISE if javac crashes

yep a hard failure is better

-------------

Marked as reviewed by vromero (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/29659#pullrequestreview-3786187414
PR Review Comment: https://git.openjdk.org/jdk/pull/29659#discussion_r2794517624


More information about the compiler-dev mailing list