On Tue, 7 Apr 2026 19:40:38 GMT, Chris Plummer <[email protected]> wrote:

>> Isn't this just a test that should not be run in preview mode? By the time 
>> value types are out of preview DiagnoseSyncOnValueBasedClasses should be 
>> gone too, at which time the test can be removed.
>
> I think the best solution for now is to bracket the EARelockingValueBased 
> test case with a `!PreviewFeatures.isEnabled()` check and then completely 
> remove when out of preview.
> 
> And I think given the nature of this change (checking if preview is enabled) 
> it might be best to push it to the valhalla repo instead.

Having second thoughts on the `PreviewFeatures.isEnabled()` approach. It 
requires changing all the subtests to use `main/othervm` instead of `driver`. 
I'm not sure why, but when using `JTREG_VM_OPTIONS="--enable-preview"`, 
`driver` mode does not pickup the vm specified options. The spawned debuggee 
does however, and that is why currently this tests fails with valhalla when 
using `--enable-preview`. I suppose another option is to use `@requires 
java.enablePreview` so we simply don't run any of EATests in preview mode. And 
there is the 3rd option we've discussed of just removing the 
`EARelockingValueBased` subtest.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/30560#discussion_r3048292837

Reply via email to