On Fri, 27 Mar 2026 00:49:35 GMT, Leonid Mesnik <[email protected]> wrote:
>> Bill Huang has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Split AddAll test into separate NoPreview and Preview scenarios using >> @enablePreview tag. > > test/jdk/java/util/Collections/AddAll.java line 36: > >> 34: >> 35: /* >> 36: * @test id=Preview > > I think that is going to fail if test is executed with > jtreg -jdk:<jdk> -test .... > > I think that is better to support > make JTREG_VALUE_CLASS=true run-test > TEST=test/jdk/java/util/Collections/AddAll.java > and in this mode test is compiled with this plugin. > > So we are not executing the preview mode by default, but can run all our test > compiling and executing with `--enable-preview`. So all JDK build in value > classes and these ValueClass marked classes are value classes. You're right that plain jtreg without cpa will fail with "plugin not found". But this is temporary solution that goes away when value classes graduate from preview - so the failure being loud and obvious is a feature, not a bug. Anyone running these tests without the plugin jar is misconfigured rather than silently getting results that don't test value class behavior. On the other hand, `make test` already handles it properly - the plugin jar is built as part of the test image and cpa is added automatically. ------------- PR Review Comment: https://git.openjdk.org/valhalla/pull/2253#discussion_r3002630887
