Skip to content

Commit c503705

Browse files
author
Hamlin Li
committed
8360090: [TEST] RISC-V: disable some cds tests on qemu
Reviewed-by: lmesnik, rehn
1 parent c460f84 commit c503705

File tree

6 files changed

+21
-2
lines changed

6 files changed

+21
-2
lines changed

test/hotspot/jtreg/TEST.ROOT

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ requires.properties= \
7979
vm.rtm.cpu \
8080
vm.rtm.compiler \
8181
vm.cds \
82+
vm.cds.default.archive.available \
8283
vm.cds.custom.loaders \
8384
vm.cds.supports.aot.class.linking \
8485
vm.cds.supports.aot.code.caching \

test/hotspot/jtreg/runtime/cds/TestDefaultArchiveLoading.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
* @test id=nocoops_nocoh
2727
* @summary Test Loading of default archives in all configurations
2828
* @requires vm.cds
29+
* @requires vm.cds.default.archive.available
2930
* @requires vm.cds.write.archived.java.heap
3031
* @requires vm.bits == 64
3132
* @library /test/lib
@@ -38,6 +39,7 @@
3839
* @test id=nocoops_coh
3940
* @summary Test Loading of default archives in all configurations (requires --enable-cds-archive-coh)
4041
* @requires vm.cds
42+
* @requires vm.cds.default.archive.available
4143
* @requires vm.cds.write.archived.java.heap
4244
* @requires vm.bits == 64
4345
* @library /test/lib
@@ -50,6 +52,7 @@
5052
* @test id=coops_nocoh
5153
* @summary Test Loading of default archives in all configurations
5254
* @requires vm.cds
55+
* @requires vm.cds.default.archive.available
5356
* @requires vm.cds.write.archived.java.heap
5457
* @requires vm.bits == 64
5558
* @library /test/lib
@@ -62,6 +65,7 @@
6265
* @test id=coops_coh
6366
* @summary Test Loading of default archives in all configurations (requires --enable-cds-archive-coh)
6467
* @requires vm.cds
68+
* @requires vm.cds.default.archive.available
6569
* @requires vm.cds.write.archived.java.heap
6670
* @requires vm.bits == 64
6771
* @library /test/lib

test/hotspot/jtreg/runtime/cds/appcds/TestDumpClassListSource.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2022, 2024, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2022, 2025, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -28,6 +28,7 @@
2828
* @summary test dynamic dump meanwhile output loaded class list
2929
* @bug 8279009 8275084
3030
* @requires vm.cds
31+
* @requires vm.cds.default.archive.available
3132
* @requires vm.cds.custom.loaders
3233
* @requires vm.flagless
3334
* @library /test/lib /test/hotspot/jtreg/runtime/cds/appcds

test/hotspot/jtreg/runtime/cds/appcds/TransformInterfaceOfLambda.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2024, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2024, 2025, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -28,6 +28,7 @@
2828
* @summary Transforming an interface of an archived lambda proxy class should not
2929
* crash the VM. The lambda proxy class should be regenerated during runtime.
3030
* @requires vm.cds
31+
* @requires vm.cds.default.archive.available
3132
* @requires vm.jvmti
3233
* @requires vm.flagless
3334
* @library /test/lib /test/hotspot/jtreg/runtime/cds/appcds/test-classes

test/hotspot/jtreg/runtime/cds/appcds/dynamicArchive/TestAutoCreateSharedArchiveNoDefaultArchive.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
* @summary Test -XX:+AutoCreateSharedArchive on a copied JDK without default shared archive
2828
* @bug 8261455
2929
* @requires vm.cds
30+
* @requires vm.cds.default.archive.available
3031
* @requires vm.flagless
3132
* @comment This test doesn't work on Windows because it depends on symlinks
3233
* @requires os.family != "windows"

test/jtreg-ext/requires/VMProps.java

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,7 @@ public Map<String, String> call() {
120120
map.put("vm.pageSize", this::vmPageSize);
121121
// vm.cds is true if the VM is compiled with cds support.
122122
map.put("vm.cds", this::vmCDS);
123+
map.put("vm.cds.default.archive.available", this::vmCDSDefaultArchiveAvailable);
123124
map.put("vm.cds.custom.loaders", this::vmCDSForCustomLoaders);
124125
map.put("vm.cds.supports.aot.class.linking", this::vmCDSSupportsAOTClassLinking);
125126
map.put("vm.cds.supports.aot.code.caching", this::vmCDSSupportsAOTCodeCaching);
@@ -424,6 +425,16 @@ protected String vmCDS() {
424425
return "" + WB.isCDSIncluded();
425426
}
426427

428+
/**
429+
* Check for CDS default archive existence.
430+
*
431+
* @return true if CDS default archive classes.jsa exists in the JDK to be tested.
432+
*/
433+
protected String vmCDSDefaultArchiveAvailable() {
434+
Path archive = Paths.get(System.getProperty("java.home"), "lib", "server", "classes.jsa");
435+
return "" + ("true".equals(vmCDS()) && Files.exists(archive));
436+
}
437+
427438
/**
428439
* Check for CDS support for custom loaders.
429440
*

0 commit comments

Comments
 (0)