8231413: Several test/hotspot/jtreg/runtime tests updates to run with --illegal-access=deny
authoralanb
Wed, 25 Sep 2019 09:17:32 +0100
changeset 58312 ce960527ecee
parent 58311 88fce7eea1f6
child 58313 8a2bc12d2a9a
8231413: Several test/hotspot/jtreg/runtime tests updates to run with --illegal-access=deny Reviewed-by: hseigel, lfoltan, dholmes
test/hotspot/jtreg/runtime/InvocationTests/invocationC1Tests.java
test/hotspot/jtreg/runtime/InvocationTests/invocationGraalTests.java
test/hotspot/jtreg/runtime/InvocationTests/invokeinterfaceTests.java
test/hotspot/jtreg/runtime/InvocationTests/invokespecialTests.java
test/hotspot/jtreg/runtime/InvocationTests/invokevirtualTests.java
test/hotspot/jtreg/runtime/Unsafe/InternalErrorTest.java
--- a/test/hotspot/jtreg/runtime/InvocationTests/invocationC1Tests.java	Mon Sep 23 16:49:09 2019 +0200
+++ b/test/hotspot/jtreg/runtime/InvocationTests/invocationC1Tests.java	Wed Sep 25 09:17:32 2019 +0100
@@ -49,8 +49,9 @@
         System.out.println("\nC1 invocation tests, Tests: " + whichTests +
                            ", class file version: " + classFileVersion);
         ProcessBuilder pb = ProcessTools.createJavaProcessBuilder(false, "-Xmx128M",
-            "-Xcomp", "-XX:TieredStopAtLevel=1", whichTests,
-            "--classfile_version=" + classFileVersion);
+            "-Xcomp", "-XX:TieredStopAtLevel=1",
+            "--add-exports", "java.base/jdk.internal.org.objectweb.asm=ALL-UNNAMED",
+            whichTests, "--classfile_version=" + classFileVersion);
         OutputAnalyzer output = new OutputAnalyzer(pb.start());
         try {
             output.shouldContain("EXECUTION STATUS: PASSED");
--- a/test/hotspot/jtreg/runtime/InvocationTests/invocationGraalTests.java	Mon Sep 23 16:49:09 2019 +0200
+++ b/test/hotspot/jtreg/runtime/InvocationTests/invocationGraalTests.java	Wed Sep 25 09:17:32 2019 +0100
@@ -51,6 +51,7 @@
                            ", class file version: " + classFileVersion);
         ProcessBuilder pb = ProcessTools.createJavaProcessBuilder(false, "-Xmx128M",
             "-XX:+UnlockExperimentalVMOptions", "-XX:+EnableJVMCI", "-XX:+UseJVMCICompiler",
+            "--add-exports", "java.base/jdk.internal.org.objectweb.asm=ALL-UNNAMED",
             whichTests, "--classfile_version=" + classFileVersion);
         OutputAnalyzer output = new OutputAnalyzer(pb.start());
         try {
--- a/test/hotspot/jtreg/runtime/InvocationTests/invokeinterfaceTests.java	Mon Sep 23 16:49:09 2019 +0200
+++ b/test/hotspot/jtreg/runtime/InvocationTests/invokeinterfaceTests.java	Wed Sep 25 09:17:32 2019 +0100
@@ -48,6 +48,7 @@
         System.out.println("\ninvokeinterface invocation tests, option: " + option +
                            ", class file version: " + classFileVersion);
         ProcessBuilder pb = ProcessTools.createJavaProcessBuilder(false, "-Xmx128M", option,
+            "--add-exports", "java.base/jdk.internal.org.objectweb.asm=ALL-UNNAMED",
             "invokeinterface.Generator", "--classfile_version=" + classFileVersion);
         OutputAnalyzer output = new OutputAnalyzer(pb.start());
         try {
--- a/test/hotspot/jtreg/runtime/InvocationTests/invokespecialTests.java	Mon Sep 23 16:49:09 2019 +0200
+++ b/test/hotspot/jtreg/runtime/InvocationTests/invokespecialTests.java	Wed Sep 25 09:17:32 2019 +0100
@@ -47,6 +47,7 @@
         System.out.println("\ninvokespecial invocation tests, option: " + option +
                            ", class file version: " + classFileVersion);
         ProcessBuilder pb = ProcessTools.createJavaProcessBuilder(false, "-Xmx128M", option,
+            "--add-exports", "java.base/jdk.internal.org.objectweb.asm=ALL-UNNAMED",
             "invokespecial.Generator", "--classfile_version=" + classFileVersion);
         OutputAnalyzer output = new OutputAnalyzer(pb.start());
         try {
--- a/test/hotspot/jtreg/runtime/InvocationTests/invokevirtualTests.java	Mon Sep 23 16:49:09 2019 +0200
+++ b/test/hotspot/jtreg/runtime/InvocationTests/invokevirtualTests.java	Wed Sep 25 09:17:32 2019 +0100
@@ -47,6 +47,7 @@
         System.out.println("\ninvokevirtual invocation tests, option: " + option +
                            ", class file version: " + classFileVersion);
         ProcessBuilder pb = ProcessTools.createJavaProcessBuilder(false, "-Xmx128M", option,
+            "--add-exports", "java.base/jdk.internal.org.objectweb.asm=ALL-UNNAMED",
             "invokevirtual.Generator", "--classfile_version=" + classFileVersion);
         OutputAnalyzer output = new OutputAnalyzer(pb.start());
         try {
--- a/test/hotspot/jtreg/runtime/Unsafe/InternalErrorTest.java	Mon Sep 23 16:49:09 2019 +0200
+++ b/test/hotspot/jtreg/runtime/Unsafe/InternalErrorTest.java	Wed Sep 25 09:17:32 2019 +0100
@@ -28,6 +28,7 @@
  * @summary Check that SIGBUS errors caused by memory accesses in Unsafe_CopyMemory()
  * and UnsafeCopySwapMemory() get converted to java.lang.InternalError exceptions.
  * @modules java.base/jdk.internal.misc
+ *          java.base/java.nio:+open
  *
  * @library /test/lib
  * @build sun.hotspot.WhiteBox