RFR: 8330647: Two CDS tests fail with -UseCompressedOops and UseSerialGC/UseParallelGC [v2]
David Holmes
dholmes at openjdk.org
Mon May 20 04:37:04 UTC 2024
On Fri, 17 May 2024 16:34:29 GMT, Calvin Cheung <ccheung at openjdk.org> wrote:
>> The following two tests contain `@requires vm.cds.write.archived.java.heap` which implies `UseG1GC && UseCompressedClassPointers`
>>
>> cds/appcds/cacheObject/ArchiveHeapTestClass.java
>> cds/serviceability/ReplaceCriticalClassesForSubgraphs.java
>>
>> The tests would fail if options conflicting with `vm.cds.write.archived.java.heap` are specified via the ` -Dtest.cds.runtime.options` property because the options would be added after the `@require` check.
>>
>> A fix is to check if the ` -Dtest.cds.runtime.options` property contains non-null value and throws a `SkippedException`.
>>
>> Update:
>> The checking of the ` -Dtest.cds.runtime.options` property is now performed in VMProps.java.
>
> Calvin Cheung has updated the pull request incrementally with one additional commit since the last revision:
>
> check test.cds.runtime.options property in VMProps.java
Update looks good. One query below. Thanks
test/jtreg-ext/requires/VMProps.java line 484:
> 482: String gc = opt.substring(GC_PREFIX.length(), opt.length() - GC_SUFFIX.length());
> 483: if (!gc.equals("G1"))
> 484: return false;
Can't you just check for `-XX:+UseG1GC` ?
-------------
PR Review: https://git.openjdk.org/jdk/pull/19274#pullrequestreview-2065325369
PR Review Comment: https://git.openjdk.org/jdk/pull/19274#discussion_r1606236006
More information about the hotspot-runtime-dev
mailing list