changeset 1109:7894c6a321d8

Amend 7901282 with previous policy files naming scheme. "Minimal security" is a bad naming.
author shade
date Thu, 29 Jan 2015 13:56:13 +0300
parents cc769fa31055
children f3dff16bc5c3
files jmh-core-it/src/test/java/org/openjdk/jmh/it/security/BenchmarkMinJVMArgsSecurityManagerTest.java jmh-core-it/src/test/java/org/openjdk/jmh/it/security/BenchmarkMinRunnerSecurityManagerTest.java jmh-core-it/src/test/java/org/openjdk/jmh/it/security/BenchmarkMinSecurityManagerTest.java jmh-core-it/src/test/java/org/openjdk/jmh/it/security/GroupMinJVMArgsSecurityManagerTest.java jmh-core-it/src/test/java/org/openjdk/jmh/it/security/GroupMinRunnerSecurityManagerTest.java jmh-core-it/src/test/java/org/openjdk/jmh/it/security/GroupMinSecurityManagerTest.java jmh-core-it/src/test/java/org/openjdk/jmh/it/security/ThreadMinJVMArgsSecurityManagerTest.java jmh-core-it/src/test/java/org/openjdk/jmh/it/security/ThreadMinRunnerSecurityManagerTest.java jmh-core-it/src/test/java/org/openjdk/jmh/it/security/ThreadMinSecurityManagerTest.java jmh-core/src/main/resources/jmh-minimal-runner-security.policy jmh-core/src/main/resources/jmh-minimal-security.policy jmh-core/src/main/resources/jmh-security-minimal-runner.policy jmh-core/src/main/resources/jmh-security-minimal.policy jmh-samples/src/main/java/org/openjdk/jmh/samples/JMHSample_33_SecurityManager.java
diffstat 14 files changed, 28 insertions(+), 28 deletions(-) [+]
line wrap: on
line diff
--- a/jmh-core-it/src/test/java/org/openjdk/jmh/it/security/BenchmarkMinJVMArgsSecurityManagerTest.java	Thu Jan 29 13:05:43 2015 +0300
+++ b/jmh-core-it/src/test/java/org/openjdk/jmh/it/security/BenchmarkMinJVMArgsSecurityManagerTest.java	Thu Jan 29 13:56:13 2015 +0300
@@ -58,7 +58,7 @@
 
     @Test
     public void invokeAPI() throws RunnerException, URISyntaxException, NoSuchAlgorithmException {
-        URI policyFile = BenchmarkMinJVMArgsSecurityManagerTest.class.getResource("/jmh-minimal-runner-security.policy").toURI();
+        URI policyFile = BenchmarkMinJVMArgsSecurityManagerTest.class.getResource("/jmh-security-minimal-runner.policy").toURI();
 
         Options opts = new OptionsBuilder()
                 .include(Fixtures.getTestMask(this.getClass()))
--- a/jmh-core-it/src/test/java/org/openjdk/jmh/it/security/BenchmarkMinRunnerSecurityManagerTest.java	Thu Jan 29 13:05:43 2015 +0300
+++ b/jmh-core-it/src/test/java/org/openjdk/jmh/it/security/BenchmarkMinRunnerSecurityManagerTest.java	Thu Jan 29 13:56:13 2015 +0300
@@ -60,7 +60,7 @@
 
     @Test
     public void invokeAPI() throws RunnerException, URISyntaxException, NoSuchAlgorithmException {
-        URI policyFile = BenchmarkMinRunnerSecurityManagerTest.class.getResource("/jmh-minimal-runner-security.policy").toURI();
+        URI policyFile = BenchmarkMinRunnerSecurityManagerTest.class.getResource("/jmh-security-minimal-runner.policy").toURI();
         Policy.setPolicy(Policy.getInstance("JavaPolicy", new URIParameter(policyFile)));
         System.setSecurityManager(new SecurityManager());
 
--- a/jmh-core-it/src/test/java/org/openjdk/jmh/it/security/BenchmarkMinSecurityManagerTest.java	Thu Jan 29 13:05:43 2015 +0300
+++ b/jmh-core-it/src/test/java/org/openjdk/jmh/it/security/BenchmarkMinSecurityManagerTest.java	Thu Jan 29 13:56:13 2015 +0300
@@ -55,7 +55,7 @@
     @Setup
     public void setup() throws IOException, NoSuchAlgorithmException, URISyntaxException {
         Fixtures.work();
-        URI policyFile = BenchmarkMinSecurityManagerTest.class.getResource("/jmh-minimal-security.policy").toURI();
+        URI policyFile = BenchmarkMinSecurityManagerTest.class.getResource("/jmh-security-minimal.policy").toURI();
         Policy.setPolicy(Policy.getInstance("JavaPolicy", new URIParameter(policyFile)));
         System.setSecurityManager(new SecurityManager());
     }
--- a/jmh-core-it/src/test/java/org/openjdk/jmh/it/security/GroupMinJVMArgsSecurityManagerTest.java	Thu Jan 29 13:05:43 2015 +0300
+++ b/jmh-core-it/src/test/java/org/openjdk/jmh/it/security/GroupMinJVMArgsSecurityManagerTest.java	Thu Jan 29 13:56:13 2015 +0300
@@ -62,7 +62,7 @@
 
     @Test
     public void invokeAPI() throws RunnerException, URISyntaxException, NoSuchAlgorithmException {
-        URI policyFile = GroupMinJVMArgsSecurityManagerTest.class.getResource("/jmh-minimal-runner-security.policy").toURI();
+        URI policyFile = GroupMinJVMArgsSecurityManagerTest.class.getResource("/jmh-security-minimal-runner.policy").toURI();
 
         Options opts = new OptionsBuilder()
                 .include(Fixtures.getTestMask(this.getClass()))
--- a/jmh-core-it/src/test/java/org/openjdk/jmh/it/security/GroupMinRunnerSecurityManagerTest.java	Thu Jan 29 13:05:43 2015 +0300
+++ b/jmh-core-it/src/test/java/org/openjdk/jmh/it/security/GroupMinRunnerSecurityManagerTest.java	Thu Jan 29 13:56:13 2015 +0300
@@ -64,7 +64,7 @@
 
     @Test
     public void invokeAPI() throws RunnerException, URISyntaxException, NoSuchAlgorithmException {
-        URI policyFile = GroupMinRunnerSecurityManagerTest.class.getResource("/jmh-minimal-runner-security.policy").toURI();
+        URI policyFile = GroupMinRunnerSecurityManagerTest.class.getResource("/jmh-security-minimal-runner.policy").toURI();
         Policy.setPolicy(Policy.getInstance("JavaPolicy", new URIParameter(policyFile)));
         System.setSecurityManager(new SecurityManager());
 
--- a/jmh-core-it/src/test/java/org/openjdk/jmh/it/security/GroupMinSecurityManagerTest.java	Thu Jan 29 13:05:43 2015 +0300
+++ b/jmh-core-it/src/test/java/org/openjdk/jmh/it/security/GroupMinSecurityManagerTest.java	Thu Jan 29 13:56:13 2015 +0300
@@ -57,7 +57,7 @@
     @Setup
     public void setup() throws IOException, NoSuchAlgorithmException, URISyntaxException {
         Fixtures.work();
-        URI policyFile = GroupMinSecurityManagerTest.class.getResource("/jmh-minimal-security.policy").toURI();
+        URI policyFile = GroupMinSecurityManagerTest.class.getResource("/jmh-security-minimal.policy").toURI();
         Policy.setPolicy(Policy.getInstance("JavaPolicy", new URIParameter(policyFile)));
         System.setSecurityManager(new SecurityManager());
     }
--- a/jmh-core-it/src/test/java/org/openjdk/jmh/it/security/ThreadMinJVMArgsSecurityManagerTest.java	Thu Jan 29 13:05:43 2015 +0300
+++ b/jmh-core-it/src/test/java/org/openjdk/jmh/it/security/ThreadMinJVMArgsSecurityManagerTest.java	Thu Jan 29 13:56:13 2015 +0300
@@ -58,7 +58,7 @@
 
     @Test
     public void invokeAPI() throws RunnerException, URISyntaxException, NoSuchAlgorithmException {
-        URI policyFile = ThreadMinJVMArgsSecurityManagerTest.class.getResource("/jmh-minimal-runner-security.policy").toURI();
+        URI policyFile = ThreadMinJVMArgsSecurityManagerTest.class.getResource("/jmh-security-minimal-runner.policy").toURI();
 
         Options opts = new OptionsBuilder()
                 .include(Fixtures.getTestMask(this.getClass()))
--- a/jmh-core-it/src/test/java/org/openjdk/jmh/it/security/ThreadMinRunnerSecurityManagerTest.java	Thu Jan 29 13:05:43 2015 +0300
+++ b/jmh-core-it/src/test/java/org/openjdk/jmh/it/security/ThreadMinRunnerSecurityManagerTest.java	Thu Jan 29 13:56:13 2015 +0300
@@ -60,7 +60,7 @@
 
     @Test
     public void invokeAPI() throws RunnerException, URISyntaxException, NoSuchAlgorithmException {
-        URI policyFile = ThreadMinRunnerSecurityManagerTest.class.getResource("/jmh-minimal-runner-security.policy").toURI();
+        URI policyFile = ThreadMinRunnerSecurityManagerTest.class.getResource("/jmh-security-minimal-runner.policy").toURI();
         Policy.setPolicy(Policy.getInstance("JavaPolicy", new URIParameter(policyFile)));
         System.setSecurityManager(new SecurityManager());
 
--- a/jmh-core-it/src/test/java/org/openjdk/jmh/it/security/ThreadMinSecurityManagerTest.java	Thu Jan 29 13:05:43 2015 +0300
+++ b/jmh-core-it/src/test/java/org/openjdk/jmh/it/security/ThreadMinSecurityManagerTest.java	Thu Jan 29 13:56:13 2015 +0300
@@ -55,7 +55,7 @@
     @Setup
     public void setup() throws IOException, NoSuchAlgorithmException, URISyntaxException {
         Fixtures.work();
-        URI policyFile = ThreadMinSecurityManagerTest.class.getResource("/jmh-minimal-security.policy").toURI();
+        URI policyFile = ThreadMinSecurityManagerTest.class.getResource("/jmh-security-minimal.policy").toURI();
         Policy.setPolicy(Policy.getInstance("JavaPolicy", new URIParameter(policyFile)));
         System.setSecurityManager(new SecurityManager());
     }
--- a/jmh-core/src/main/resources/jmh-minimal-runner-security.policy	Thu Jan 29 13:05:43 2015 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,13 +0,0 @@
-grant {
-    permission java.lang.RuntimePermission "accessDeclaredMembers";
-    permission java.lang.RuntimePermission "modifyThread";
-    permission java.lang.RuntimePermission "accessClassInPackage.sun.misc";
-    permission java.lang.RuntimePermission "setSecurityManager";
-    permission java.lang.RuntimePermission "shutdownHooks";
-    permission java.lang.RuntimePermission "setIO";
-    permission java.lang.reflect.ReflectPermission "suppressAccessChecks";
-    permission java.util.PropertyPermission "*", "read";
-    permission java.lang.management.ManagementPermission "monitor";
-    permission java.io.FilePermission "/-", "read,write,execute,delete";
-    permission java.net.SocketPermission "*", "connect,resolve,accept,listen";
-};
\ No newline at end of file
--- a/jmh-core/src/main/resources/jmh-minimal-security.policy	Thu Jan 29 13:05:43 2015 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,4 +0,0 @@
-grant {
-    permission java.lang.RuntimePermission "modifyThread";
-    permission java.lang.RuntimePermission "setSecurityManager";
-};
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jmh-core/src/main/resources/jmh-security-minimal-runner.policy	Thu Jan 29 13:56:13 2015 +0300
@@ -0,0 +1,13 @@
+grant {
+    permission java.lang.RuntimePermission "accessDeclaredMembers";
+    permission java.lang.RuntimePermission "modifyThread";
+    permission java.lang.RuntimePermission "accessClassInPackage.sun.misc";
+    permission java.lang.RuntimePermission "setSecurityManager";
+    permission java.lang.RuntimePermission "shutdownHooks";
+    permission java.lang.RuntimePermission "setIO";
+    permission java.lang.reflect.ReflectPermission "suppressAccessChecks";
+    permission java.util.PropertyPermission "*", "read";
+    permission java.lang.management.ManagementPermission "monitor";
+    permission java.io.FilePermission "/-", "read,write,execute,delete";
+    permission java.net.SocketPermission "*", "connect,resolve,accept,listen";
+};
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jmh-core/src/main/resources/jmh-security-minimal.policy	Thu Jan 29 13:56:13 2015 +0300
@@ -0,0 +1,4 @@
+grant {
+    permission java.lang.RuntimePermission "modifyThread";
+    permission java.lang.RuntimePermission "setSecurityManager";
+};
\ No newline at end of file
--- a/jmh-samples/src/main/java/org/openjdk/jmh/samples/JMHSample_33_SecurityManager.java	Thu Jan 29 13:05:43 2015 +0300
+++ b/jmh-samples/src/main/java/org/openjdk/jmh/samples/JMHSample_33_SecurityManager.java	Thu Jan 29 13:56:13 2015 +0300
@@ -69,10 +69,10 @@
      * the SecurityManager is not installed.
      *
      * If you need a restricted security policy for the tests, you are advised to
-     * get /jmh-minimal-security.policy, that contains the minimal permissions
+     * get /jmh-security-minimal.policy, that contains the minimal permissions
      * required for JMH benchmark to run, merge the new permissions there, produce new
      * policy file in a temporary location, and load that policy file instead.
-     * There is also /jmh-minimal-runner-security.policy, that contains the minimal
+     * There is also /jmh-security-minimal-runner.policy, that contains the minimal
      * permissions for the JMH harness to run, if you want to use JVM args to arm
      * the SecurityManager.
      */