diff --git a/make/nashorn/build.xml b/make/nashorn/build.xml index 42b3380f..e6b2b5b4 100644 --- a/make/nashorn/build.xml +++ b/make/nashorn/build.xml @@ -346,134 +346,6 @@ - - - - - -package.access=sun.misc.,\ - sun.reflect.,\ - org.openjdk.nashorn.internal.test - - - - - - - - - -grant codeBase "file:/${basedir}/${nashorn.jar}" { - permission java.security.AllPermission; -}; - -grant codeBase "file:/${basedir}/${jjs.jar}" { - permission java.security.AllPermission; -}; - -grant codeBase "file:/${basedir}/${nashorn.internal.tests.jar}" { - permission java.security.AllPermission; -}; - -grant codeBase "file:/${basedir}/${nashorn.api.tests.jar}" { - permission java.util.PropertyPermission "parserapitest.*", "read"; - permission java.util.PropertyPermission "test.*", "read"; - permission java.util.PropertyPermission "test262.*", "read"; - permission java.io.FilePermission "${basedir}/test/nashorn/-","read"; - permission java.io.FilePermission "$${user.dir}", "read"; - permission java.util.PropertyPermission "user.dir", "read"; -}; - -grant codeBase "file:/${basedir}/${file.reference.testng.jar}" { - permission java.security.AllPermission; -}; -grant codeBase "file:/${basedir}/${file.reference.jcommander.jar}" { - permission java.security.AllPermission; -}; -grant codeBase "file:/${basedir}/${file.reference.bsh.jar}" { - permission java.security.AllPermission; -}; -grant codeBase "file:/${basedir}/${file.reference.snakeyaml.jar}" { - permission java.security.AllPermission; -}; -//// in case of absolute path: -grant codeBase "file:/${nashorn.internal.tests.jar}" { - permission java.security.AllPermission; -}; - -grant codeBase "file:/${file.reference.testng.jar}" { - permission java.security.AllPermission; -}; -grant codeBase "file:/${file.reference.jcommander.jar}" { - permission java.security.AllPermission; -}; -grant codeBase "file:/${file.reference.bsh.jar}" { - permission java.security.AllPermission; -}; -grant codeBase "file:/${file.reference.snakeyaml.jar}" { - permission java.security.AllPermission; -}; - -grant codeBase "file:/${basedir}/${test.script.dir}/trusted/*" { - permission java.security.AllPermission; -}; - -grant codeBase "file:/${basedir}/${test.script.dir}/maptests/*" { - permission java.io.FilePermission "${basedir}/${test.script.dir}/maptests/*","read"; - permission java.lang.RuntimePermission "nashorn.debugMode"; -}; - -grant codeBase "file:/${basedir}/${test.script.dir}/basic/*" { - permission java.io.FilePermission "${basedir}/${test.script.dir}/-", "read"; - permission java.io.FilePermission "$${user.dir}", "read"; - permission java.util.PropertyPermission "user.dir", "read"; - permission java.util.PropertyPermission "nashorn.test.*", "read"; -}; - -grant codeBase "file:/${basedir}/${test.script.dir}/basic/apply_to_call/*" { - permission java.io.FilePermission "${basedir}/${test.script.dir}/-", "read"; - permission java.io.FilePermission "$${user.dir}", "read"; - permission java.util.PropertyPermission "user.dir", "read"; - permission java.util.PropertyPermission "nashorn.test.*", "read"; -}; - -grant codeBase "file:/${basedir}/${test.script.dir}/basic/parser/*" { - permission java.io.FilePermission "${basedir}/${test.script.dir}/-", "read"; - permission java.io.FilePermission "$${user.dir}", "read"; - permission java.util.PropertyPermission "user.dir", "read"; - permission java.util.PropertyPermission "nashorn.test.*", "read"; -}; - -grant codeBase "file:/${basedir}/${test.script.dir}/basic/es6/*" { - permission java.io.FilePermission "${basedir}/${test.script.dir}/-", "read"; - permission java.io.FilePermission "$${user.dir}", "read"; - permission java.util.PropertyPermission "user.dir", "read"; - permission java.util.PropertyPermission "nashorn.test.*", "read"; -}; - -grant codeBase "file:/${basedir}/${test.script.dir}/basic/JDK-8010946-privileged.js" { - permission java.util.PropertyPermission "java.security.policy", "read"; -}; - -grant codeBase "file:/${basedir}/${test.script.dir}/basic/classloader.js" { - permission java.lang.RuntimePermission "nashorn.JavaReflection"; -}; - -grant codeBase "file:/${basedir}/${test.script.dir}/markdown.js" { - permission java.io.FilePermission "${basedir}/${test.script.dir}/external/showdown/-", "read"; -}; - -grant codeBase "file:/${basedir}/${test.script.dir}/basic/JDK-8158467.js" { - permission java.lang.RuntimePermission "nashorn.setConfig"; -}; - - - - \/ - /// - - - @@ -529,34 +401,11 @@ grant codeBase "file:/${basedir}/${test.script.dir}/basic/JDK-8158467.js" { - - - - - - - - - - - - - - - - - - - - - - @@ -565,28 +414,20 @@ grant codeBase "file:/${basedir}/${test.script.dir}/basic/JDK-8158467.js" { - + - - - - - + - - - - @@ -620,14 +461,14 @@ grant codeBase "file:/${basedir}/${test.script.dir}/basic/JDK-8158467.js" { - + - + @@ -638,14 +479,14 @@ grant codeBase "file:/${basedir}/${test.script.dir}/basic/JDK-8158467.js" { - + - + @@ -661,10 +502,10 @@ grant codeBase "file:/${basedir}/${test.script.dir}/basic/JDK-8158467.js" { - + - + @@ -679,12 +520,12 @@ grant codeBase "file:/${basedir}/${test.script.dir}/basic/JDK-8158467.js" { - + - + diff --git a/make/nashorn/project.properties b/make/nashorn/project.properties index af21c6d7..0dc112ce 100644 --- a/make/nashorn/project.properties +++ b/make/nashorn/project.properties @@ -195,7 +195,7 @@ testjfx.dir=${test.script.dir}/jfx testmarkdown.dir=${test.script.dir}/markdown test-sys-prop.test.dir=${test.dir} -test-sys-prop.test.js.roots=${test.basic.dir} ${test.maptests.dir} ${test.error.dir} ${test.sandbox.dir} ${test.trusted.dir} +test-sys-prop.test.js.roots=${test.basic.dir} ${test.maptests.dir} ${test.error.dir} ${test.sandbox.dir} ${test.trusted.dir} ${test.nosecurity.dir} test-sys-prop.test262.suite.dir=${test262.suite.dir} test-sys-prop.es5conform.testcases.dir=${test.external.dir}/ES5Conform/TestCases test-sys-prop.test.basic.dir=${test.basic.dir} @@ -204,12 +204,8 @@ test-sys-prop.test.maptests.dir=${test.maptests.dir} test-sys-prop.test.sandbox.dir=${test.sandbox.dir} test-sys-prop.test.trusted.dir=${test.trusted.dir} -test-sys-prop-no-security.test.dir=${test.dir} -test-sys-prop-no-security.test.js.roots=${test.nosecurity.dir} - # framework root for our script tests test-sys-prop.test.js.framework=${test.script.dir}/assert.js -test-sys-prop-no-security.test.js.framework=${test.script.dir}/assert.js # Control the verbosity of ParserTest test-sys-prop.parsertest.verbose=false @@ -422,13 +418,8 @@ run.test.jvmargs.main=${run.test.jvmargs.common} -esa -ea # Use best known performance options for octane run.test.jvmargs.octane.main=${run.test.jvmargs.common} -XX:TypeProfileLevel=222 -# Security manager args - make sure that we run with the nashorn.policy that the build creates -run.test.jvmsecurityargs=-Xverify:all -Djava.security.manager -Djava.security.policy=${build.dir}/nashorn.policy -Djava.security.properties=${build.dir}/nashorn.security.properties - # VM options for script tests with @fork option -test-sys-prop.test.fork.jvm.options=${run.test.jvmargs.main} -Xmx${run.test.xmx} ${run.test.jvmsecurityargs} -cp ${run.test.classpath} -# VM options for no-security script tests with @fork option - same as above but without jvmsecurityargs -test-sys-prop-no-security.test.fork.jvm.options=${run.test.jvmargs.main} -Xmx${run.test.xmx} -cp ${run.test.classpath} +test-sys-prop.test.fork.jvm.options=${run.test.jvmargs.main} -Xmx${run.test.xmx} -cp ${run.test.classpath} # path of rhino.jar for benchmarks rhino.dir=