From 520937488e6a3037fcd7054483bb321918afae4b Mon Sep 17 00:00:00 2001 From: mchung Date: Tue, 15 Jun 2010 20:29:22 -0700 Subject: [PATCH] 6961518: TEST_BUG: add @run main/othervm in tests that call setSecurityManager Summary: Mark tests to run in othervm Reviewed-by: ohair --- test/ProblemList.txt | 13 ------------- test/java/beans/Beans/Test4080522.java | 1 + test/java/beans/EventHandler/Test6277246.java | 1 + test/java/beans/EventHandler/Test6277266.java | 1 + test/java/beans/Introspector/Test6277246.java | 1 + test/java/lang/ClassLoader/UninitializedParent.java | 1 + .../lang/ClassLoader/findSystemClass/Loader.java | 6 ++++++ .../java/lang/System/IgnoreNullSecurityManager.java | 1 + test/java/lang/annotation/ParameterAnnotations.java | 1 + test/java/util/ResourceBundle/Bug6359330.java | 1 + test/java/util/ResourceBundle/Test4300693.java | 1 + 11 files changed, 15 insertions(+), 13 deletions(-) diff --git a/test/ProblemList.txt b/test/ProblemList.txt index 558530b82..46fa2f07b 100644 --- a/test/ProblemList.txt +++ b/test/ProblemList.txt @@ -174,10 +174,6 @@ java/beans/Statement/Test4653179.java generic-all 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 @@ java/io/StreamTokenizer/Comment.java generic-all # 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 @@ -359,12 +352,8 @@ java/lang/management/RuntimeMXBean/UpTime.java generic-all # Solaris sparc, samevm, java.lang.Exception: Read from closed pipe hangs 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/reflect/Proxy/returnTypes/Test.java generic-all 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 @@ java/util/logging/ParentLoggersTest.java generic-all # 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 diff --git a/test/java/beans/Beans/Test4080522.java b/test/java/beans/Beans/Test4080522.java index a26a2f10e..c6ee1b89b 100644 --- a/test/java/beans/Beans/Test4080522.java +++ b/test/java/beans/Beans/Test4080522.java @@ -29,6 +29,7 @@ * Beans.setGuiAvailable * Introspector.setBeanInfoSearchPath * PropertyEditorManager.setEditorSearchPath + * @run main/othervm Test4080522 * @author Graham Hamilton */ diff --git a/test/java/beans/EventHandler/Test6277246.java b/test/java/beans/EventHandler/Test6277246.java index e009aad34..f0d9aaaa8 100644 --- a/test/java/beans/EventHandler/Test6277246.java +++ b/test/java/beans/EventHandler/Test6277246.java @@ -25,6 +25,7 @@ * @test * @bug 6277246 * @summary Tests problem with java.beans use of reflection + * @run main/othervm Test6277246 * @author Jeff Nisewanger */ diff --git a/test/java/beans/EventHandler/Test6277266.java b/test/java/beans/EventHandler/Test6277266.java index f64f852fd..a23a4daea 100644 --- a/test/java/beans/EventHandler/Test6277266.java +++ b/test/java/beans/EventHandler/Test6277266.java @@ -25,6 +25,7 @@ * @test * @bug 6277266 * @summary Tests access control issue in EventHandler + * @run main/othervm Test6277266 * @author Jeff Nisewanger */ diff --git a/test/java/beans/Introspector/Test6277246.java b/test/java/beans/Introspector/Test6277246.java index 826f6e42f..40ea01616 100644 --- a/test/java/beans/Introspector/Test6277246.java +++ b/test/java/beans/Introspector/Test6277246.java @@ -25,6 +25,7 @@ * @test * @bug 6277246 * @summary Tests problem with java.beans use of reflection + * @run main/othervm Test6277246 * @author Jeff Nisewanger */ diff --git a/test/java/lang/ClassLoader/UninitializedParent.java b/test/java/lang/ClassLoader/UninitializedParent.java index 9b751f664..9d4459d01 100644 --- a/test/java/lang/ClassLoader/UninitializedParent.java +++ b/test/java/lang/ClassLoader/UninitializedParent.java @@ -26,6 +26,7 @@ * @bug 6636650 * @summary Uninitialized class loaders should not be a parent of other * class loaders. + * @run main/othervm UninitializedParent */ diff --git a/test/java/lang/ClassLoader/findSystemClass/Loader.java b/test/java/lang/ClassLoader/findSystemClass/Loader.java index 34061485b..60f1b7972 100644 --- a/test/java/lang/ClassLoader/findSystemClass/Loader.java +++ b/test/java/lang/ClassLoader/findSystemClass/Loader.java @@ -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 */ /* diff --git a/test/java/lang/System/IgnoreNullSecurityManager.java b/test/java/lang/System/IgnoreNullSecurityManager.java index 555238a27..03a2c0cc3 100644 --- a/test/java/lang/System/IgnoreNullSecurityManager.java +++ b/test/java/lang/System/IgnoreNullSecurityManager.java @@ -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 { diff --git a/test/java/lang/annotation/ParameterAnnotations.java b/test/java/lang/annotation/ParameterAnnotations.java index ec36608e6..7c98241f3 100644 --- a/test/java/lang/annotation/ParameterAnnotations.java +++ b/test/java/lang/annotation/ParameterAnnotations.java @@ -27,6 +27,7 @@ * @summary Check properties of Annotations returned from * getParameterAnnotations, including freedom from security * exceptions. + * @run main/othervm ParameterAnnotations * @author Martin Buchholz */ diff --git a/test/java/util/ResourceBundle/Bug6359330.java b/test/java/util/ResourceBundle/Bug6359330.java index 538ce9fc2..2755f3376 100644 --- a/test/java/util/ResourceBundle/Bug6359330.java +++ b/test/java/util/ResourceBundle/Bug6359330.java @@ -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; diff --git a/test/java/util/ResourceBundle/Test4300693.java b/test/java/util/ResourceBundle/Test4300693.java index d40b45b48..471c0c8cf 100644 --- a/test/java/util/ResourceBundle/Test4300693.java +++ b/test/java/util/ResourceBundle/Test4300693.java @@ -22,6 +22,7 @@ */ /* @test + @ignore 6876961 @summary test that ResourceBundle.getBundle can be called recursively @build Test4300693RB @run main Test4300693 -- GitLab