RFR: 8317228: GC: Make TestXXXHeapSizeFlags use createTestJvm [v2]

Stefan Johansson sjohanss at openjdk.org
Fri Oct 13 12:06:24 UTC 2023


On Fri, 13 Oct 2023 08:49:47 GMT, Leo Korinth <lkorinth at openjdk.org> wrote:

>> Minor testing done, I will test more later with other fixes.
>
> Leo Korinth has updated the pull request incrementally with one additional commit since the last revision:
> 
>   add @key flag-sensitive

Some small comments but I'm ok with the change as is. 

I'm not sure how we should handle additional flags we know fail, but aren't part of the CI testing. For example: `G1HeapRegionSize=8m` or larger is not good for `TestG1HeapSizeFlags.java`. So feel free to add this if you think that is the correct way to go.

test/hotspot/jtreg/gc/arguments/TestG1HeapSizeFlags.java line 29:

> 27:  * @test TestG1HeapSizeFlags
> 28:  * @bug 8006088
> 29:  * @requires vm.gc.G1 & vm.opt.x.Xmx == null & vm.opt.x.Xms == null & vm.opt.MinHeapSize == null & vm.opt.MaxHeapSize == null & vm.opt.InitialHeapSize == null

Please move the requires below the @key to be consistent with the other tests.

test/jtreg-ext/requires/VMProps.java line 143:

> 141:         map.put("vm.flagless", this::isFlagless);
> 142:         map.put("jdk.foreign.linker", this::jdkForeignLinker);
> 143:         map.putAll(xOptFlags()); // -Xmx4g -> @requires vm.opt.x.Xmx == "4g" )

Does it have to be `vm.opt.x.*` or could we just add those to `vm.opt` and use for example: `vm.opt.Xmx == null`? Or do we have -X and -XX: options that collide?

test/jtreg-ext/requires/VMProps.java line 728:

> 726:         return allFlags()
> 727:             .filter(s -> s.startsWith("-X") && !s.startsWith("-XX:") && !s.equals("-X"))
> 728:             .map(s -> s.replaceFirst("-*", ""))

Is there a need to replace "-*", should you be able to just do:
 ```suggestion
             .map(s -> s.replaceFirst("-", ""))

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

Marked as reviewed by sjohanss (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/15986#pullrequestreview-1676158052
PR Review Comment: https://git.openjdk.org/jdk/pull/15986#discussion_r1358057744
PR Review Comment: https://git.openjdk.org/jdk/pull/15986#discussion_r1358061437
PR Review Comment: https://git.openjdk.org/jdk/pull/15986#discussion_r1358091024


More information about the hotspot-gc-dev mailing list