From 01f287ca56688c57bf3f68a62877c6ce67535eae Mon Sep 17 00:00:00 2001 From: LongyuZhang Date: Tue, 23 Jul 2024 11:43:32 -0400 Subject: [PATCH] Extract Thread Test to JDK 22 and under - Thread functions are removed for JDK 23, extract test to JDK 22 and under Signed-off-by: LongyuZhang --- test/functional/Java8andUp/build.xml | 27 +++++++++- test/functional/Java8andUp/playlist.xml | 49 +++++++++++++++++++ test/functional/Java8andUp/testng.xml | 2 - test/functional/Java8andUp/testng_thread.xml | 37 ++++++++++++++ .../cmdLineTests/jvmtitests/build.xml | 43 +++++++++++----- 5 files changed, 143 insertions(+), 15 deletions(-) create mode 100644 test/functional/Java8andUp/testng_thread.xml diff --git a/test/functional/Java8andUp/build.xml b/test/functional/Java8andUp/build.xml index 2d1972558ea..a9f472ed81a 100644 --- a/test/functional/Java8andUp/build.xml +++ b/test/functional/Java8andUp/build.xml @@ -286,11 +286,32 @@ SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 OR GPL-2.0-only WITH Classpath-ex + + + + + + + + + + + + + + + + + + + + + - + - + @@ -301,6 +322,8 @@ SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 OR GPL-2.0-only WITH Classpath-ex + + diff --git a/test/functional/Java8andUp/playlist.xml b/test/functional/Java8andUp/playlist.xml index 8e3ac2656f0..d1bafdd2ac1 100644 --- a/test/functional/Java8andUp/playlist.xml +++ b/test/functional/Java8andUp/playlist.xml @@ -1136,6 +1136,55 @@ SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 OR GPL-2.0-only WITH Classpath-ex ibm + + JCL_Test_Thread + + NoOptions + -XX:RecreateClassfileOnload + -XX:+CompactStrings + + $(ADD_JVM_LIB_DIR_TO_LIBPATH) \ + $(JAVA_COMMAND) $(JAVA_SECURITY_MANAGER) $(JVM_OPTIONS) -verbose:stacktrace -Djava.security.policy=$(Q)$(TEST_RESROOT)$(D)java.policy$(Q) \ + -Drowset.provider.classname=org.openj9.resources.classloader.CustomSyncProvider \ + --add-modules openj9.sharedclasses $(ADD_MODULE_JAVA_SE_EE) \ + --add-exports java.base/com.ibm.oti.vm=ALL-UNNAMED \ + --add-exports java.base/com.ibm.oti.util=ALL-UNNAMED \ + --add-exports java.base/jdk.internal.vm.annotation=ALL-UNNAMED \ + --add-exports java.base/jdk.internal.misc=ALL-UNNAMED $(ADD_EXPORTS_JDK_INTERNAL_REFLECT) \ + --add-exports java.base/com.ibm.jit.crypto=ALL-UNNAMED \ + --add-exports java.base/com.ibm.oti.reflect=ALL-UNNAMED \ + --add-exports java.base/sun.net.www.protocol.jrt=ALL-UNNAMED \ + --add-opens=java.base/java.lang=ALL-UNNAMED \ + --add-opens=java.base/java.security=ALL-UNNAMED \ + $(ADD_EXPORTS_JDK_INTERNAL_ACCESS) \ + -cp $(Q)$(RESOURCES_DIR)$(P)$(TESTNG)$(P)$(TEST_RESROOT)$(D)GeneralTest.jar$(P)$(TEST_RESROOT)$(D)TestResources.jar$(P)$(LIB_DIR)$(D)asm-all.jar$(JAXB_API_JAR)$(Q) \ + org.testng.TestNG -d $(REPORTDIR) $(Q)$(TEST_RESROOT)$(D)testng_thread.xml$(Q) \ + -testnames \ + JCL_TEST_Java-Lang_Tread \ + -groups $(TEST_GROUP) \ + -excludegroups $(DEFAULT_EXCLUDE); \ + $(TEST_STATUS) + ^vm.hrt + + sanity + + + functional + + + [11, 22] + + + AOT:nonapplicable + + + native + + + openj9 + ibm + + JCL_Test_Native diff --git a/test/functional/Java8andUp/testng.xml b/test/functional/Java8andUp/testng.xml index a0dfd6f506d..09bcc508681 100644 --- a/test/functional/Java8andUp/testng.xml +++ b/test/functional/Java8andUp/testng.xml @@ -197,9 +197,7 @@ - - diff --git a/test/functional/Java8andUp/testng_thread.xml b/test/functional/Java8andUp/testng_thread.xml new file mode 100644 index 00000000000..86fd58b9048 --- /dev/null +++ b/test/functional/Java8andUp/testng_thread.xml @@ -0,0 +1,37 @@ + + + + + + + + + + + + + + + + + diff --git a/test/functional/cmdLineTests/jvmtitests/build.xml b/test/functional/cmdLineTests/jvmtitests/build.xml index 4799a530c73..ce64a0a4e8b 100644 --- a/test/functional/cmdLineTests/jvmtitests/build.xml +++ b/test/functional/cmdLineTests/jvmtitests/build.xml @@ -90,17 +90,38 @@ SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 OR GPL-2.0-only WITH Classpath-ex - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +