Skip to content

Commit 4d664ec

Browse files
committed
cvm/overlay: (2/2) Fix Unknown VM error in hotspot test
Add cvm type of VM in hotspot test framework
1 parent ef20666 commit 4d664ec

5 files changed

Lines changed: 16 additions & 10 deletions

File tree

cvm.mk

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -356,6 +356,10 @@ endif
356356
$(call overlay_single,jdk8u,langtools/test/tools/javac/annotations/8218152/MalformedAnnotationProcessorTests.java, $(JDK8_SRCROOT))
357357
$(call overlay_single,jdk8u,langtools/test/tools/javac/6508981/TestInferBinaryName.java, $(JDK8_SRCROOT))
358358

359+
-overlay-hotspot8:
360+
$(call overlay_single,jdk8u,hotspot/test/testlibrary/com/oracle/java/testlibrary/Platform.java, $(JDK8_SRCROOT))
361+
$(call overlay_single,jdk8u,hotspot/test/testlibrary/com/oracle/java/testlibrary/cli/CommandLineOptionTest.java, $(JDK8_SRCROOT))
362+
359363
-overlay-jtreg:
360364
$(call overlay_single,jdk8u,test/jtreg-ext/requires/VMProps.java, $(JDK8_SRCROOT))
361365

@@ -376,7 +380,7 @@ test_jtreg8_jdk_core: -setup_jtreg8 -overlay-jdk8
376380
$(eval JT_TEST = ":jdk_core")
377381
$(call run_jtreg8_test,$(JDK8_SRCROOT)/jdk/test,$(JT_TEST),$(JT_OPTS_EXCLUDE))
378382

379-
test_jtreg8_hotspot8: -setup_jtreg8 -overlay-jtreg
383+
test_jtreg8_hotspot8: -setup_jtreg8 -overlay-jtreg -overlay-hotspot8
380384
$(eval JT_REPO = hotspot)
381385
$(call run_jtreg8_test,$(JDK8_SRCROOT)/$(JT_REPO)/test,$(JT_TEST),$(JT_OPTS_EXCLUDE))
382386

cvm/conf/jtreg_hotspot8_excludes_aarch64.list

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,4 +186,3 @@ compiler/7184394/TestAESMain.java
186186
compiler/intrinsics/sha/cli/TestUseSHA1IntrinsicsOptionOnSupportedCPU.java
187187
compiler/intrinsics/sha/cli/TestUseSHA256IntrinsicsOptionOnSupportedCPU.java
188188
compiler/intrinsics/sha/cli/TestUseSHA512IntrinsicsOptionOnSupportedCPU.java
189-
compiler/intrinsics/sha/cli/TestUseSHAOptionOnSupportedCPU.java

cvm/conf/jtreg_hotspot8_excludes_x64.list

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -32,15 +32,9 @@ compiler/profiling/spectrapredefineclass/Launcher.java
3232
compiler/rangechecks/TestRangeCheckSmearing.java
3333
compiler/rtm/cli/TestPrintPreciseRTMLockingStatisticsOptionOnUnsupportedConfig.java
3434
compiler/rtm/cli/TestRTMAbortRatioOptionOnUnsupportedConfig.java
35-
compiler/rtm/cli/TestRTMAbortThresholdOption.java
36-
compiler/rtm/cli/TestRTMLockingCalculationDelayOption.java
37-
compiler/rtm/cli/TestRTMLockingThresholdOption.java
38-
compiler/rtm/cli/TestRTMRetryCountOption.java
39-
compiler/rtm/cli/TestRTMSpinLoopCountOption.java
4035
compiler/rtm/cli/TestRTMTotalCountIncrRateOptionOnUnsupportedConfig.java
4136
compiler/rtm/cli/TestUseRTMDeoptOptionOnUnsupportedConfig.java
4237
compiler/rtm/cli/TestUseRTMForStackLocksOptionOnUnsupportedConfig.java
43-
compiler/rtm/cli/TestUseRTMXendForLockBusyOption.java
4438
compiler/stable/TestStableBoolean.java
4539
compiler/stable/TestStableChar.java
4640
compiler/stable/TestStableByte.java
@@ -175,7 +169,6 @@ testlibrary/ctw/test/JarDirTest.java
175169
testlibrary/ctw/test/JarsTest.java
176170
testlibrary_tests/whitebox/vm_flags/DoubleTest.java
177171
testlibrary_tests/whitebox/vm_flags/IntxTest.java
178-
runtime/NMT/MallocStressTest.java
179172
testlibrary_tests/TestMutuallyExclusivePlatformPredicates.java
180173
vmTestbase/nsk/jdb/monitor/monitor002/monitor002.java
181174

@@ -184,5 +177,5 @@ compiler/intrinsics/sha/cli/TestUseSHA1IntrinsicsOptionOnUnsupportedCPU.java
184177
compiler/intrinsics/sha/cli/TestUseSHA256IntrinsicsOptionOnUnsupportedCPU.java
185178
compiler/intrinsics/sha/cli/TestUseSHA512IntrinsicsOptionOnUnsupportedCPU.java
186179
compiler/intrinsics/sha/cli/TestUseSHAOptionOnUnsupportedCPU.java
187-
runtime/containers/docker/DockerBasicTest.java
188180
compiler/rtm/cli/TestUseRTMLockingOptionOnUnsupportedVM.java
181+
runtime/containers/docker/DockerBasicTest.java

cvm/overlay/jdk8u/hotspot/test/testlibrary/com/oracle/java/testlibrary/Platform.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
// This project is a modified version of OpenJDK, licensed under GPL v2.
2+
// Modifications Copyright (C) 2025 ByteDance Inc.
13
/*
24
* Copyright (c) 2013, 2018, Oracle and/or its affiliates. All rights reserved.
35
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -43,6 +45,10 @@ public static boolean isServer() {
4345
return vmName.endsWith(" Server VM");
4446
}
4547

48+
public static boolean isCVM() {
49+
return vmName.contains("CompoundVM");
50+
}
51+
4652
public static boolean isGraal() {
4753
return vmName.endsWith(" Graal VM");
4854
}

cvm/overlay/jdk8u/hotspot/test/testlibrary/com/oracle/java/testlibrary/cli/CommandLineOptionTest.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
// This project is a modified version of OpenJDK, licensed under GPL v2.
2+
// Modifications Copyright (C) 2025 ByteDance Inc.
13
/*
24
* Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
35
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -299,6 +301,8 @@ private static String getVMTypeOption() {
299301
return "-minimal";
300302
} else if (Platform.isGraal()) {
301303
return "-graal";
304+
} else if (Platform.isCVM()) {
305+
return "-cvm";
302306
}
303307
throw new RuntimeException("Unknown VM mode.");
304308
}

0 commit comments

Comments
 (0)