RFR: 8360022: ClassRefDupInConstantPoolTest.java fails when running in repeat

Chen Liang liach at openjdk.org
Wed Jul 2 22:29:41 UTC 2025


On Wed, 2 Jul 2025 21:36:07 GMT, Chen Liang <liach at openjdk.org> wrote:

> The javac test `ClassRefDupInConstantPoolTest.java` has an incorrect clean directive: when its subsidary Duplicates class is cleaned, the main class is not, and jtreg eagerly reexecutes the main class and then the test fails by not able to find the nested class.
> 
> This problem is evident when running from intellij idea. It can also be reproduced consistently by:
> 
> make test TEST=langtools/tools/javac/jvm/ClassRefDupInConstantPoolTest.java JTREG=REPEAT_COUNT=2
> 
> 
> Testing: that make test line above now passes.

The placement of clean and run doesn't matter here - for both fails and successes. Per my understanding, they usually are only important when there are multiple run directives in one jtreg header.

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

PR Comment: https://git.openjdk.org/jdk/pull/26106#issuecomment-3029489025


More information about the compiler-dev mailing list