On Wed, 5 Aug 2026 12:02:11 GMT, Yasumasa Suenaga <[email protected]> wrote:

> We can see following errors when we run `make test` with 
> `JTREG="VALUE_CLASS_PLUGIN=true;VM_OPTIONS=--enable-preview"`:
> 
> TestInstanceKlassSize
> 
>  stderr: [Exception in thread "main" java.lang.UnsupportedClassVersionError:
>  Preview features are not enabled for jdk/test/whitebox/WhiteBox (class file
>  version 72.65535). Try running with '--enable-preview'
>         at java.base/java.lang.ClassLoader.findBootstrapClass(Native Method)
>         at java.base/java.lang.ClassLoader.findBootstrapClassOrNull(ClassLoa
> der.java:1244)
>         at java.base/java.lang.System$1.findBootstrapClassOrNull(System.java
> :2068)
>         at java.base/jdk.internal.loader.ClassLoaders$BootClassLoader.loadCl
> assOrNull(ClassLoaders.java:138)
>         at java.base/jdk.internal.loader.BuiltinClassLoader.loadClassOrNull(
> BuiltinClassLoader.java:639)
>         at java.base/jdk.internal.loader.BuiltinClassLoader.loadClassOrNull(
> BuiltinClassLoader.java:615)
>         at java.base/jdk.internal.loader.BuiltinClassLoader.loadClassOrNull(
> BuiltinClassLoader.java:639)
>         at java.base/jdk.internal.loader.BuiltinClassLoader.loadClassOrNull(
> BuiltinClassLoader.java:615)
>         at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(Builti
> nClassLoader.java:578)
>         at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:502)
>         at TestInstanceKlassSize.<clinit>(TestInstanceKlassSize.java:65)
> ]
>  exitValue = 1
> 
> java.lang.RuntimeException: Expected to get exit value of [0], exit value is
> : [1]
>         at jdk.test.lib.process.OutputAnalyzer.shouldHaveExitValue(OutputAna
> lyzer.java:602)
>         at TestInstanceKlassSize.startMeWithArgs(TestInstanceKlassSize.java:
> 100)
>         at TestInstanceKlassSize.main(TestInstanceKlassSize.java:152)
>         at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(
> DirectMethodHandleAccessor.java:104)
>         at java.base/java.lang.reflect.Method.invoke(Method.java:583)
>         at com.sun.javatest.regtest.agent.MainMethodHelper.executeModernMain
> Class(MainMethodHelper.java:55)
>         at com.sun.javatest.regtest.agent.MainWrapper$MainTask.run(MainWrapp
> er.java:138)
>         at java.base/java.lang.Thread.run(Thread.java:1527)
> 
> 
> TestInstanceKlassSizeForInterface
> 
>  stderr: [Exception in thread "main" java.lang.UnsupportedClassVersionError: 
> Preview features are not enabled for jdk/test/whitebox/WhiteBox (class file 
> version 72.65535). Try running with '--enable-preview'
>         at java.base/java.lang.ClassLoader.findBootstrapClass(Native Method)
> ...

These tests pass with VM_OPTIONS=--enable-preview. They are failing for you 
because of the addition of VALUE_CLASS_PLUGIN=true. I don't think we normally 
run the SA tests with this option. Maybe you can fix this by having 
processBuilder include --enable-preview when it is part of test.vm.opts?

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

PR Review: https://git.openjdk.org/jdk/pull/32210#pullrequestreview-4867794354

Reply via email to