6961518: TEST_BUG: add @run main/othervm in tests that call setSecurityManager
authormchung
Tue, 15 Jun 2010 20:29:22 -0700
changeset 5796 ce710cdec799
parent 5795 49e9a038c105
child 5797 c2641f6791be
6961518: TEST_BUG: add @run main/othervm in tests that call setSecurityManager Summary: Mark tests to run in othervm Reviewed-by: ohair
jdk/test/ProblemList.txt
jdk/test/java/beans/Beans/Test4080522.java
jdk/test/java/beans/EventHandler/Test6277246.java
jdk/test/java/beans/EventHandler/Test6277266.java
jdk/test/java/beans/Introspector/Test6277246.java
jdk/test/java/lang/ClassLoader/UninitializedParent.java
jdk/test/java/lang/ClassLoader/findSystemClass/Loader.java
jdk/test/java/lang/System/IgnoreNullSecurityManager.java
jdk/test/java/lang/annotation/ParameterAnnotations.java
jdk/test/java/util/ResourceBundle/Bug6359330.java
jdk/test/java/util/ResourceBundle/Test4300693.java
--- a/jdk/test/ProblemList.txt	Tue Jun 15 21:43:59 2010 +0100
+++ b/jdk/test/ProblemList.txt	Tue Jun 15 20:29:22 2010 -0700
@@ -174,10 +174,6 @@
 java/beans/XMLEncoder/Test4625418.java				solaris-sparc
 
 # Problems with samevm and setting security manager (speculation partially)
-java/beans/Beans/Test4080522.java				generic-all
-java/beans/EventHandler/Test6277246.java			generic-all
-java/beans/EventHandler/Test6277266.java			generic-all
-java/beans/Introspector/Test6277246.java			generic-all
 java/beans/Introspector/4168475/Test4168475.java		generic-all
 java/beans/Introspector/4520754/Test4520754.java		generic-all
 java/beans/Introspector/6380849/TestBeanInfo.java		generic-all
@@ -344,9 +340,6 @@
 # Some of these tests (like java/lang/management) may just need to be marked
 #   othervm, but that is partially speculation.
 
-# Samevm failure on OpenSolaris, security manager?
-java/lang/ClassLoader/UninitializedParent.java			generic-all
-
 # Times out on solaris 10 sparc
 java/lang/ClassLoader/Assert.java				generic-all
 
@@ -360,11 +353,7 @@
 java/lang/Runtime/exec/SleepyCat.java				generic-all
 
 # Need to be marked othervm, or changed to be samevm safe
-java/lang/annotation/ParameterAnnotations.java			generic-all
-
-# Need to be marked othervm, or changed to be samevm safe
 java/lang/ClassLoader/defineClass/DefineClassByteBuffer.java	generic-all
-java/lang/ClassLoader/findSystemClass/Loader.java		generic-all
 
 # Fedora 9 32bit, -client, samevm, Error while cleaning up threads after test
 java/lang/management/ThreadMXBean/Locks.java			generic-all
@@ -408,7 +397,6 @@
 java/lang/Runtime/exec/LotsOfOutput.java			generic-all
 java/lang/System/ExitFinalizersAndJIT.java			generic-all
 java/lang/System/finalization/FinThreads.java			generic-all
-java/lang/System/IgnoreNullSecurityManager.java			generic-all
 java/lang/Thread/GenerifyStackTraces.java			generic-all
 java/lang/Thread/StackTraces.java				generic-all
 java/lang/ThreadGroup/Daemon.java				generic-all
@@ -1247,7 +1235,6 @@
 
 # Need to be marked othervm, or changed to be samevm safe
 java/util/ResourceBundle/Bug4168625Test.java			generic-all
-java/util/ResourceBundle/Bug6359330.java			generic-all
 java/util/ResourceBundle/TestBug4179766.java			generic-all
 
 # Need to be marked othervm, or changed to be samevm safe
--- a/jdk/test/java/beans/Beans/Test4080522.java	Tue Jun 15 21:43:59 2010 +0100
+++ b/jdk/test/java/beans/Beans/Test4080522.java	Tue Jun 15 20:29:22 2010 -0700
@@ -29,6 +29,7 @@
  *          Beans.setGuiAvailable
  *          Introspector.setBeanInfoSearchPath
  *          PropertyEditorManager.setEditorSearchPath
+ * @run main/othervm Test4080522
  * @author Graham Hamilton
  */
 
--- a/jdk/test/java/beans/EventHandler/Test6277246.java	Tue Jun 15 21:43:59 2010 +0100
+++ b/jdk/test/java/beans/EventHandler/Test6277246.java	Tue Jun 15 20:29:22 2010 -0700
@@ -25,6 +25,7 @@
  * @test
  * @bug 6277246
  * @summary Tests problem with java.beans use of reflection
+ * @run main/othervm Test6277246
  * @author Jeff Nisewanger
  */
 
--- a/jdk/test/java/beans/EventHandler/Test6277266.java	Tue Jun 15 21:43:59 2010 +0100
+++ b/jdk/test/java/beans/EventHandler/Test6277266.java	Tue Jun 15 20:29:22 2010 -0700
@@ -25,6 +25,7 @@
  * @test
  * @bug 6277266
  * @summary Tests access control issue in EventHandler
+ * @run main/othervm Test6277266
  * @author Jeff Nisewanger
  */
 
--- a/jdk/test/java/beans/Introspector/Test6277246.java	Tue Jun 15 21:43:59 2010 +0100
+++ b/jdk/test/java/beans/Introspector/Test6277246.java	Tue Jun 15 20:29:22 2010 -0700
@@ -25,6 +25,7 @@
  * @test
  * @bug 6277246
  * @summary Tests problem with java.beans use of reflection
+ * @run main/othervm Test6277246
  * @author Jeff Nisewanger
  */
 
--- a/jdk/test/java/lang/ClassLoader/UninitializedParent.java	Tue Jun 15 21:43:59 2010 +0100
+++ b/jdk/test/java/lang/ClassLoader/UninitializedParent.java	Tue Jun 15 20:29:22 2010 -0700
@@ -26,6 +26,7 @@
  * @bug 6636650
  * @summary Uninitialized class loaders should not be a parent of other
  *          class loaders.
+ * @run main/othervm UninitializedParent
  */
 
 
--- a/jdk/test/java/lang/ClassLoader/findSystemClass/Loader.java	Tue Jun 15 21:43:59 2010 +0100
+++ b/jdk/test/java/lang/ClassLoader/findSystemClass/Loader.java	Tue Jun 15 20:29:22 2010 -0700
@@ -21,10 +21,16 @@
  * questions.
  */
 
+/*
+ * This test runs in othervm mode as it tests ClassLoader.findSystemClass
+ * and getSystemResource methods.
+ */
+
 /* @test
    @bug 4147599 4478150
    @summary In 1.2beta4-I ClassLoader loaded classes can not link
             against application classes.
+   @run main/othervm Loader
 */
 
 /*
--- a/jdk/test/java/lang/System/IgnoreNullSecurityManager.java	Tue Jun 15 21:43:59 2010 +0100
+++ b/jdk/test/java/lang/System/IgnoreNullSecurityManager.java	Tue Jun 15 20:29:22 2010 -0700
@@ -26,6 +26,7 @@
  * @bug 4213876
  * @summary Make sure "null" security manager is ignored, as specified in the
  * javadocs
+ * @run main/othervm IgnoreNullSecurityManager
  */
 
 public class IgnoreNullSecurityManager {
--- a/jdk/test/java/lang/annotation/ParameterAnnotations.java	Tue Jun 15 21:43:59 2010 +0100
+++ b/jdk/test/java/lang/annotation/ParameterAnnotations.java	Tue Jun 15 20:29:22 2010 -0700
@@ -27,6 +27,7 @@
  * @summary Check properties of Annotations returned from
  * getParameterAnnotations, including freedom from security
  * exceptions.
+ * @run main/othervm ParameterAnnotations
  * @author Martin Buchholz
  */
 
--- a/jdk/test/java/util/ResourceBundle/Bug6359330.java	Tue Jun 15 21:43:59 2010 +0100
+++ b/jdk/test/java/util/ResourceBundle/Bug6359330.java	Tue Jun 15 20:29:22 2010 -0700
@@ -26,6 +26,7 @@
  * @summary Make sure that getBundle doesn't cause a security error
  * with a security manager when instantialing RBClassLoader (internal
  * classloader).
+ * @run main/othervm Bug6359330
  */
 
 import javax.xml.parsers.SAXParser;
--- a/jdk/test/java/util/ResourceBundle/Test4300693.java	Tue Jun 15 21:43:59 2010 +0100
+++ b/jdk/test/java/util/ResourceBundle/Test4300693.java	Tue Jun 15 20:29:22 2010 -0700
@@ -22,6 +22,7 @@
  */
 /*
     @test
+    @ignore 6876961
     @summary test that ResourceBundle.getBundle can be called recursively
     @build  Test4300693RB
     @run main Test4300693