# HG changeset patch # User alanb # Date 1569399452 -3600 # Node ID ce960527ecee3fb9f99334d20b7ce6f53871f04c # Parent 88fce7eea1f670bc2f8b2e5ec441586a768f1e7c 8231413: Several test/hotspot/jtreg/runtime tests updates to run with --illegal-access=deny Reviewed-by: hseigel, lfoltan, dholmes diff -r 88fce7eea1f6 -r ce960527ecee test/hotspot/jtreg/runtime/InvocationTests/invocationC1Tests.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"); diff -r 88fce7eea1f6 -r ce960527ecee test/hotspot/jtreg/runtime/InvocationTests/invocationGraalTests.java --- 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 { diff -r 88fce7eea1f6 -r ce960527ecee test/hotspot/jtreg/runtime/InvocationTests/invokeinterfaceTests.java --- 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 { diff -r 88fce7eea1f6 -r ce960527ecee test/hotspot/jtreg/runtime/InvocationTests/invokespecialTests.java --- 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 { diff -r 88fce7eea1f6 -r ce960527ecee test/hotspot/jtreg/runtime/InvocationTests/invokevirtualTests.java --- 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 { diff -r 88fce7eea1f6 -r ce960527ecee test/hotspot/jtreg/runtime/Unsafe/InternalErrorTest.java --- 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