mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 15:24:43 +02:00
8236975: compiler/graalunit tests fails with --illegal-access=deny
Reviewed-by: iignatyev, kvn, alanb
This commit is contained in:
parent
6be46f8ebb
commit
ebdb70fe9e
8 changed files with 66 additions and 30 deletions
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2018, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2018, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
|
@ -34,7 +34,7 @@
|
|||
*
|
||||
* @run driver jdk.test.lib.FileInstaller ../../ProblemList-graal.txt ExcludeList.txt
|
||||
*
|
||||
* @run main/othervm -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI compiler.graalunit.common.GraalUnitTestLauncher -prefix org.graalvm.compiler.core.test -exclude ExcludeList.txt
|
||||
* @run main/othervm -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI compiler.graalunit.common.GraalUnitTestLauncher -prefix org.graalvm.compiler.core.test -exclude ExcludeList.txt -vmargs --add-opens=java.base/java.lang=ALL-UNNAMED
|
||||
*/
|
||||
|
||||
/* DO NOT MODIFY THIS FILE. GENERATED BY generateTests.sh */
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
*
|
||||
* @run driver jdk.test.lib.FileInstaller ../../ProblemList-graal.txt ExcludeList.txt
|
||||
*
|
||||
* @run main/othervm -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI compiler.graalunit.common.GraalUnitTestLauncher -prefix org.graalvm.compiler.graph.test -exclude ExcludeList.txt
|
||||
* @run main/othervm -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI compiler.graalunit.common.GraalUnitTestLauncher -prefix org.graalvm.compiler.graph.test -exclude ExcludeList.txt -vmargs --add-opens=jdk.internal.vm.compiler/org.graalvm.graphio=ALL-UNNAMED
|
||||
*/
|
||||
|
||||
/* DO NOT MODIFY THIS FILE. GENERATED BY generateTests.sh */
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2018, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2018, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
|
@ -34,7 +34,7 @@
|
|||
*
|
||||
* @run driver jdk.test.lib.FileInstaller ../../ProblemList-graal.txt ExcludeList.txt
|
||||
*
|
||||
* @run main/othervm -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI compiler.graalunit.common.GraalUnitTestLauncher -prefix org.graalvm.compiler.hotspot.jdk9.test -exclude ExcludeList.txt
|
||||
* @run main/othervm -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI compiler.graalunit.common.GraalUnitTestLauncher -prefix org.graalvm.compiler.hotspot.jdk9.test -exclude ExcludeList.txt -vmargs --add-opens=java.base/java.lang=ALL-UNNAMED
|
||||
*/
|
||||
|
||||
/* DO NOT MODIFY THIS FILE. GENERATED BY generateTests.sh */
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2018, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2018, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
|
@ -25,7 +25,7 @@
|
|||
* @test
|
||||
* @summary
|
||||
* @requires vm.jvmci
|
||||
* @requires vm.simpleArch == "sparcv9"
|
||||
* @requires vm.simpleArch=="sparcv9"
|
||||
* @modules jdk.internal.vm.compiler
|
||||
*
|
||||
* @library /test/lib /compiler/graalunit /
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2018, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2018, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
|
@ -34,7 +34,7 @@
|
|||
*
|
||||
* @run driver jdk.test.lib.FileInstaller ../../ProblemList-graal.txt ExcludeList.txt
|
||||
*
|
||||
* @run main/othervm -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI compiler.graalunit.common.GraalUnitTestLauncher -prefix org.graalvm.compiler.replacements.test -exclude ExcludeList.txt
|
||||
* @run main/othervm -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI compiler.graalunit.common.GraalUnitTestLauncher -prefix org.graalvm.compiler.replacements.test -exclude ExcludeList.txt -vmargs --add-opens=java.base/java.lang=ALL-UNNAMED
|
||||
*/
|
||||
|
||||
/* DO NOT MODIFY THIS FILE. GENERATED BY generateTests.sh */
|
||||
|
|
|
@ -4,24 +4,24 @@ Api org.graalvm.compiler.api.test
|
|||
AsmAarch64 org.graalvm.compiler.asm.aarch64.test
|
||||
AsmAmd64 org.graalvm.compiler.asm.amd64.test
|
||||
AsmSparc org.graalvm.compiler.asm.sparc.test
|
||||
Core org.graalvm.compiler.core.test @requires !vm.graal.enabled
|
||||
Core org.graalvm.compiler.core.test --requires !vm.graal.enabled --vmargs --add-opens=java.base/java.lang=ALL-UNNAMED
|
||||
EA org.graalvm.compiler.core.test.ea
|
||||
CoreAmd64 org.graalvm.compiler.core.amd64.test
|
||||
CoreAarch64 org.graalvm.compiler.core.aarch64.test
|
||||
CoreJdk9 org.graalvm.compiler.core.jdk9.test
|
||||
Debug org.graalvm.compiler.debug.test
|
||||
Graph org.graalvm.compiler.graph.test
|
||||
Graph org.graalvm.compiler.graph.test --vmargs --add-opens=jdk.internal.vm.compiler/org.graalvm.graphio=ALL-UNNAMED
|
||||
Hotspot org.graalvm.compiler.hotspot.test
|
||||
HotspotAarch64 org.graalvm.compiler.hotspot.aarch64.test
|
||||
HotspotAmd64 org.graalvm.compiler.hotspot.amd64.test
|
||||
HotspotJdk9 org.graalvm.compiler.hotspot.jdk9.test
|
||||
HotspotSparc org.graalvm.compiler.hotspot.sparc.test @requires vm.simpleArch == "sparcv9"
|
||||
HotspotJdk9 org.graalvm.compiler.hotspot.jdk9.test --vmargs --add-opens=java.base/java.lang=ALL-UNNAMED
|
||||
HotspotSparc org.graalvm.compiler.hotspot.sparc.test --requires vm.simpleArch=="sparcv9"
|
||||
HotspotLir org.graalvm.compiler.hotspot.lir.test
|
||||
Loop org.graalvm.compiler.loop.test
|
||||
Nodes org.graalvm.compiler.nodes.test
|
||||
Options org.graalvm.compiler.options.test
|
||||
PhasesCommon org.graalvm.compiler.phases.common.test
|
||||
Replacements org.graalvm.compiler.replacements.test
|
||||
Replacements org.graalvm.compiler.replacements.test --vmargs --add-opens=java.base/java.lang=ALL-UNNAMED
|
||||
Replacements9 org.graalvm.compiler.replacements.jdk9.test
|
||||
Replacements12 org.graalvm.compiler.replacements.jdk12.test
|
||||
Util org.graalvm.util.test
|
||||
|
@ -32,8 +32,8 @@ JttHotpath org.graalvm.compiler.jtt.hotpath
|
|||
JttHotspot org.graalvm.compiler.jtt.hotspot
|
||||
JttJdk org.graalvm.compiler.jtt.jdk
|
||||
JttLangAL org.graalvm.compiler.jtt.lang.[a-lA-L]
|
||||
JttLangMathAL org.graalvm.compiler.jtt.lang.Math_[a-lA-L] timeout=300
|
||||
JttLangMathMZ org.graalvm.compiler.jtt.lang.Math_[m-zM-Z] timeout=300
|
||||
JttLangMathAL org.graalvm.compiler.jtt.lang.Math_[a-lA-L] --timeout 300
|
||||
JttLangMathMZ org.graalvm.compiler.jtt.lang.Math_[m-zM-Z] --timeout 300
|
||||
JttLangNZ org.graalvm.compiler.jtt.lang.[n-zN-Z]
|
||||
JttLoop org.graalvm.compiler.jtt.loop
|
||||
Jtt.Micro org.graalvm.compiler.jtt.micro
|
||||
|
|
|
@ -183,6 +183,7 @@ public class GraalUnitTestLauncher {
|
|||
|
||||
String testPrefix = null;
|
||||
String excludeFileName = null;
|
||||
ArrayList<String> testJavaFlags = new ArrayList<String>();
|
||||
|
||||
int i=0;
|
||||
String arg, val;
|
||||
|
@ -199,6 +200,10 @@ public class GraalUnitTestLauncher {
|
|||
excludeFileName = val;
|
||||
break;
|
||||
|
||||
case "-vmargs":
|
||||
testJavaFlags.addAll(Arrays.asList(val.split("(?i):space:")));
|
||||
break;
|
||||
|
||||
default:
|
||||
System.out.println("WARN: illegal option " + arg);
|
||||
break;
|
||||
|
@ -234,9 +239,8 @@ public class GraalUnitTestLauncher {
|
|||
javaFlags.addAll(getModuleExports("jdk.internal.vm.compiler", "ALL-UNNAMED"));
|
||||
javaFlags.addAll(getModuleExports("jdk.internal.vm.ci", "ALL-UNNAMED,jdk.internal.vm.compiler"));
|
||||
|
||||
// add opens, see JDK-8236211
|
||||
javaFlags.add("--add-opens");
|
||||
javaFlags.add("jdk.internal.vm.compiler/org.graalvm.graphio=ALL-UNNAMED");
|
||||
// add test specific flags
|
||||
javaFlags.addAll(testJavaFlags);
|
||||
|
||||
// add VM flags
|
||||
javaFlags.add("-XX:+UnlockExperimentalVMOptions");
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#!/bin/bash
|
||||
#
|
||||
# Copyright (c) 2018, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2018, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
|
@ -22,19 +22,51 @@
|
|||
# questions.
|
||||
#
|
||||
|
||||
while read -r fName pName timeoutInfo requireInfo
|
||||
while read -r -a TEST_ARGS
|
||||
do
|
||||
fName="${fName}Test.java"
|
||||
echo "Generate $fName for $pName ..."
|
||||
set -- "${TEST_ARGS[@]}"
|
||||
|
||||
action="main/othervm"
|
||||
flags="-XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI"
|
||||
if [[ $timeoutInfo == timeout* ]] ; then
|
||||
action="$action/$timeoutInfo"
|
||||
action="main/othervm"
|
||||
flags="-XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI"
|
||||
requireInfo=""
|
||||
vmargs=""
|
||||
|
||||
if [ "$#" -ge 2 ] ; then
|
||||
fName="$1Test.java"; shift
|
||||
pName=$1; shift
|
||||
|
||||
echo "Generate $fName for $pName ..."
|
||||
|
||||
while [ $# -gt 0 ]; do
|
||||
case $1 in
|
||||
--requires)
|
||||
shift
|
||||
requireInfo="@requires $1"
|
||||
shift
|
||||
;;
|
||||
|
||||
--timeout)
|
||||
shift
|
||||
action="$action/timeout=$1"
|
||||
shift
|
||||
;;
|
||||
|
||||
--vmargs)
|
||||
shift
|
||||
vmargs="-vmargs $1"
|
||||
shift
|
||||
;;
|
||||
|
||||
* )
|
||||
echo "WARN: unknown option $1 in line \"$TEST_ARGS\" will be ignored"
|
||||
shift
|
||||
;;
|
||||
esac
|
||||
done
|
||||
else
|
||||
requireInfo="$timeoutInfo $requireInfo"
|
||||
echo "ERROR in line \"$TEST_ARGS\""
|
||||
fi
|
||||
|
||||
|
||||
|
||||
cat << EOF | sed 's/[[:blank:]]*$//' > $fName
|
||||
/*
|
||||
|
@ -73,7 +105,7 @@ do
|
|||
*
|
||||
* @run driver jdk.test.lib.FileInstaller ../../ProblemList-graal.txt ExcludeList.txt
|
||||
*
|
||||
* @run $action $flags compiler.graalunit.common.GraalUnitTestLauncher -prefix $pName -exclude ExcludeList.txt
|
||||
* @run $action $flags compiler.graalunit.common.GraalUnitTestLauncher -prefix $pName -exclude ExcludeList.txt $vmargs
|
||||
*/
|
||||
|
||||
/* DO NOT MODIFY THIS FILE. GENERATED BY generateTests.sh */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue