Skip to content

Commit

Permalink
Separate tests that rely on SecurityManager (Java8andUp)
Browse files Browse the repository at this point in the history
SecurityManager will be removed in a future jdk. Separate tests that
rely on it so that they can be easily disabled in the future.

Issue: eclipse-openj9#14412
Signed-off-by: Eric Yang <[email protected]>
  • Loading branch information
EricYangIBM authored and pshipton committed Feb 28, 2022
1 parent 84e6f5f commit 4494bee
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 3 deletions.
33 changes: 33 additions & 0 deletions test/functional/Java8andUp/playlist.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1504,6 +1504,39 @@
<impl>ibm</impl>
</impls>
</test>
<test>
<testCaseName>JCL_TEST_Java-Security_SM</testCaseName>
<variations>
<variation>NoOptions</variation>
</variations>
<command>$(JAVA_COMMAND) $(JAVA_SECURITY_MANAGER) $(JVM_OPTIONS) -verbose:stacktrace \
--add-modules openj9.sharedclasses $(ADD_MODULE_JAVA_SE_EE) \
--add-exports java.base/com.ibm.oti.util=ALL-UNNAMED \
--add-opens=java.base/java.lang=ALL-UNNAMED \
--add-opens=java.base/java.security=ALL-UNNAMED \
-Djava.security.policy=$(Q)$(TEST_RESROOT)$(D)testacc.policy$(Q) \
-Xbootclasspath/a:$(TEST_RESROOT)$(D)TestResources.jar \
-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$(Q) \
org.testng.TestNG -d $(REPORTDIR) $(Q)$(TEST_RESROOT)$(D)testng.xml$(Q) \
-testnames JCL_TEST_Java-Security_SM \
-groups $(TEST_GROUP) \
-excludegroups $(DEFAULT_EXCLUDE); \
$(TEST_STATUS)</command>
<platformRequirements>^vm.hrt</platformRequirements>
<levels>
<level>sanity</level>
</levels>
<groups>
<group>functional</group>
</groups>
<versions>
<version>9+</version>
</versions>
<impls>
<impl>openj9</impl>
<impl>ibm</impl>
</impls>
</test>
<test>
<testCaseName>JCL_Test_JITHelpers_SE80</testCaseName>
<command>$(JAVA_COMMAND) $(JVM_OPTIONS) \
Expand Down
11 changes: 8 additions & 3 deletions test/functional/Java8andUp/testng.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>

<!--
Copyright (c) 2016, 2021 IBM Corp. and others
Copyright (c) 2016, 2022 IBM Corp. and others
This program and the accompanying materials are made available under
the terms of the Eclipse Public License 2.0 which accompanies this
Expand Down Expand Up @@ -247,14 +247,19 @@
</test>
<test name="JCL_TEST_Java-Security">
<classes>
<class name="org.openj9.test.java.security.Test_AccessController"/>
<class name="org.openj9.test.java.security.Test_AccessControlContext"/>
<class name="org.openj9.test.java.security.Test_MHLoaderConstraints"/>
<class name="org.openj9.test.java.security.DigestLoop"/>
<class name="org.openj9.test.java.security.OpenSSLInvalidCBCKeySizeTest"/>
<class name="org.openj9.test.java.security.OpenSSLInvalidGCMKeySizeTest"/>
</classes>
</test>
<test name="JCL_TEST_Java-Security_SM">
<!-- Tests that depend on SecurityManager -->
<classes>
<class name="org.openj9.test.java.security.Test_AccessController"/>
<class name="org.openj9.test.java.security.Test_AccessControlContext"/>
</classes>
</test>
<test name="JCL_TEST_IBM-VM">
<classes>
<class name="org.openj9.test.vm.Test_MsgHelp"/>
Expand Down

0 comments on commit 4494bee

Please sign in to comment.