Skip to content

Commit 6a58af3

Browse files
author
Vladimir Kozlov
committed
8357143: New test AOTCodeCompressedOopsTest.java fails on platforms without AOT Code Cache support
Reviewed-by: asmehra, fyang, shade, mdoerr
1 parent 84a98ab commit 6a58af3

File tree

4 files changed

+18
-9
lines changed

4 files changed

+18
-9
lines changed

test/hotspot/jtreg/TEST.ROOT

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ requires.properties= \
8181
vm.cds \
8282
vm.cds.custom.loaders \
8383
vm.cds.supports.aot.class.linking \
84+
vm.cds.supports.aot.code.caching \
8485
vm.cds.write.archived.java.heap \
8586
vm.continuations \
8687
vm.jvmti \

test/hotspot/jtreg/runtime/cds/appcds/aotCode/AOTCodeCompressedOopsTest.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,8 @@
2525
/**
2626
* @test
2727
* @summary Sanity test of AOT Code Cache with compressed oops configurations
28-
* @requires vm.cds
29-
* @requires vm.cds.supports.aot.class.linking
28+
* @requires vm.cds.supports.aot.code.caching
3029
* @requires vm.flagless
31-
* @requires !vm.jvmci.enabled
3230
* @library /test/lib /test/setup_aot
3331
* @build AOTCodeCompressedOopsTest JavacBenchApp
3432
* @run driver jdk.test.lib.helpers.ClassFileInstaller -jar app.jar

test/hotspot/jtreg/runtime/cds/appcds/aotCode/AOTCodeFlags.java

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,8 @@
2525
/**
2626
* @test
2727
* @summary Sanity test of combinations of the AOT Code Caching diagnostic flags
28-
* @requires vm.cds
29-
* @requires vm.cds.supports.aot.class.linking
30-
* @requires vm.flavor != "zero"
31-
* @requires os.arch=="amd64" | os.arch=="x86_64" | os.arch=="aarch64"
28+
* @requires vm.cds.supports.aot.code.caching
3229
* @requires vm.flagless
33-
* @comment work around JDK-8345635
34-
* @requires !vm.jvmci.enabled
3530
* @library /test/lib /test/setup_aot
3631
* @build AOTCodeFlags JavacBenchApp
3732
* @run driver jdk.test.lib.helpers.ClassFileInstaller -jar app.jar

test/jtreg-ext/requires/VMProps.java

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,7 @@ public Map<String, String> call() {
124124
map.put("vm.cds", this::vmCDS);
125125
map.put("vm.cds.custom.loaders", this::vmCDSForCustomLoaders);
126126
map.put("vm.cds.supports.aot.class.linking", this::vmCDSSupportsAOTClassLinking);
127+
map.put("vm.cds.supports.aot.code.caching", this::vmCDSSupportsAOTCodeCaching);
127128
map.put("vm.cds.write.archived.java.heap", this::vmCDSCanWriteArchivedJavaHeap);
128129
map.put("vm.continuations", this::vmContinuations);
129130
// vm.graal.enabled is true if Graal is used as JIT
@@ -472,6 +473,20 @@ protected String vmCDSSupportsAOTClassLinking() {
472473
return vmCDSCanWriteArchivedJavaHeap();
473474
}
474475

476+
/**
477+
* @return true if this VM can support the AOT Code Caching
478+
*/
479+
protected String vmCDSSupportsAOTCodeCaching() {
480+
if ("true".equals(vmCDSSupportsAOTClassLinking()) &&
481+
!"zero".equals(vmFlavor()) &&
482+
"false".equals(vmJvmciEnabled()) &&
483+
(Platform.isX64() || Platform.isAArch64())) {
484+
return "true";
485+
} else {
486+
return "false";
487+
}
488+
}
489+
475490
/**
476491
* @return true if the VM options specified via the "test.cds.runtime.options"
477492
* property is compatible with writing Java heap objects into the CDS archive

0 commit comments

Comments
 (0)