On Wed, 4 Nov 2026 13:20:18 GMT, Marc Chevalier <[email protected]> wrote:

> I've also replaced explicit class name with `${test.main.class}`. Here are a 
> bit of details, in alphabetical order:
> 
> - 
> `test/hotspot/jtreg/compiler/intrinsics/sha/sanity/TestSHA512MultiBlockIntrinsics.java`:
>   one of the `@run` was running `TestSHA1Intrinsics` instead of  
> `TestSHA512MultiBlockIntrinsics`. That looks wrong. `${test.main.class}` 
> avoids that. If this is on purpose, I think it deserves a comment (is there 
> one I missed?)
> - `test/hotspot/jtreg/compiler/types/TestMeetXor.java`:
>   this one is even why I started running after the other, because I noticed 
> that the flag had incorrect syntax, and I wondered why it wasn't failing.
> - `test/hotspot/jtreg/gc/TestObjectAlignment.java`:
>   all the flags (`-Xmx20M -XX:+ExplicitGCInvokesConcurrent 
> -XX:ObjectAlignmentInBytes=...`) of the 12 `@run` were ignored.
> - `test/hotspot/jtreg/gc/shenandoah/TestArrayCopyCheckCast.java`:
>   `-XX:ShenandoahGCMode=generational` after the class name.
> - `test/hotspot/jtreg/runtime/cds/CheckSharingWithDefaultArchive.java`:
>   `-showversion` after class name
> - `test/jdk/java/awt/Debug/DumpOnKey/DumpOnKey.java`:
>   I learned something with this one. It mixes JVM flags and program argument. 
> There should be only one program argument, and it is parsed as a bool. But 
> actually, all the flags are passed after the class name so as soon as there 
> is one flag, it was taken for the expected boolean. What I learned is that 
> `Boolean.parseBoolean` never fails. It just returns `false`, except in the 
> few cases where it returns `true`. I expected that it would throw if given 
> something that doesn't look like `false` or `true` (up to case, and maybe 
> with alternative). Funky semantics.
> - `test/jdk/jdk/jfr/startupargs/TestStartNoSettings.java`:
>   `-XX:StartFlightRecording:settings=none` after the class name.
> - `test/jdk/sun/security/ssl/SSLSocketImpl/ReverseNameLookup.java`:
>   `-Djava.net.preferIPv4Stack` after the class name.
> 
> Thanks,
> Marc
> 
> ---------
> - [x] I confirm that I make this contribution in accordance with the [OpenJDK 
> Interim AI Policy](https://openjdk.org/legal/ai).

This pull request has now been integrated.

Changeset: d849a5da
Author:    Marc Chevalier <[email protected]>
URL:       
https://git.openjdk.org/jdk/commit/d849a5dafad8b9766e248979983afd927015174e
Stats:     31 lines in 8 files changed: 0 ins; 1 del; 30 mod

8396668: Fix various tests where flags appear after the class name

Reviewed-by: thartmann, stefank, chagedorn, prr

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

PR: https://git.openjdk.org/jdk/pull/33720

Reply via email to