--- old/test/TEST.ROOT 2014-01-24 14:23:17.897186295 +0800 +++ new/test/TEST.ROOT 2014-01-24 14:23:16.925066817 +0800 @@ -5,7 +5,7 @@ keys=2d dnd i18n # Tests that must run in othervm mode -othervm.dirs=java/awt java/beans java/rmi javax/accessibility javax/imageio javax/sound javax/print javax/management com/sun/awt sun/awt sun/java2d sun/pisces sun/rmi +othervm.dirs=java/awt java/beans javax/accessibility javax/imageio javax/sound javax/print javax/management com/sun/awt sun/awt sun/java2d sun/pisces # Tests that cannot run concurrently exclusiveAccess.dirs=java/rmi/Naming java/util/Currency java/util/prefs sun/management/jmxremote sun/tools/jstatd sun/security/mscapi --- old/test/java/rmi/MarshalledObject/compare/Compare.java 2014-01-24 14:23:27.084174960 +0800 +++ new/test/java/rmi/MarshalledObject/compare/Compare.java 2014-01-24 14:23:25.368186990 +0800 @@ -29,7 +29,7 @@ * not involved in location should be compared. * @author Ken Arnold * - * @run main Compare 11 annotatedRef + * @run main/othervm Compare 11 annotatedRef */ import java.rmi.MarshalledObject; --- old/test/java/rmi/MarshalledObject/compare/HashCode.java 2014-01-24 14:23:34.062193621 +0800 +++ new/test/java/rmi/MarshalledObject/compare/HashCode.java 2014-01-24 14:23:31.663096337 +0800 @@ -27,7 +27,7 @@ * @summary MarshalledObject with null throws NullPointerException * @author Ken Arnold * - * @run main HashCode 11 annotatedRef + * @run main/othervm HashCode 11 annotatedRef */ import java.rmi.MarshalledObject; --- old/test/java/rmi/Naming/DefaultRegistryPort.java 2014-01-24 14:23:39.748142843 +0800 +++ new/test/java/rmi/Naming/DefaultRegistryPort.java 2014-01-24 14:23:38.260065996 +0800 @@ -28,7 +28,7 @@ * @author Dana Burns * @library ../testlibrary * @build TestLibrary - * @run main DefaultRegistryPort + * @run main/othervm DefaultRegistryPort */ /* --- old/test/java/rmi/Naming/LookupIPv6.java 2014-01-24 14:23:46.858158161 +0800 +++ new/test/java/rmi/Naming/LookupIPv6.java 2014-01-24 14:23:44.926075004 +0800 @@ -25,7 +25,8 @@ * @summary Ensure that java.rmi.Naming.lookup can handle URLs containing * IPv6 addresses. * @bug 4402708 - * + * @library ../testlibrary + * @build TestLibrary * @run main/othervm -Djava.net.preferIPv6Addresses=true LookupIPv6 */ @@ -37,6 +38,8 @@ import java.rmi.registry.Registry; public class LookupIPv6 { + private static final int REGISTRY_PORT = TestLibrary.getUnusedRandomPort(); + public static void main(String[] args) throws Exception { // use loopback IPv6 address to avoid lengthy socket connection delays String[] urls = { @@ -67,12 +70,12 @@ System.out.println("IPv6 detected"); Registry reg; try { - reg = LocateRegistry.createRegistry(Registry.REGISTRY_PORT); + reg = LocateRegistry.createRegistry(REGISTRY_PORT); } catch (Exception ex) { reg = LocateRegistry.getRegistry(); } reg.rebind("foo", reg); - Naming.lookup("rmi://[" + localAddr.getHostAddress() + "]/foo"); + Naming.lookup("rmi://[" + localAddr.getHostAddress() + "]" + ":" + REGISTRY_PORT + "/foo"); } } } --- old/test/java/rmi/Naming/LookupNameWithColon.java 2014-01-24 14:23:52.382177298 +0800 +++ new/test/java/rmi/Naming/LookupNameWithColon.java 2014-01-24 14:23:51.040093123 +0800 @@ -28,7 +28,7 @@ * * @library ../testlibrary * @build TestLibrary - * @run main LookupNameWithColon + * @run main/othervm LookupNameWithColon */ import java.rmi.Naming; --- old/test/java/rmi/Naming/legalRegistryNames/LegalRegistryNames.java 2014-01-24 14:23:55.484055100 +0800 +++ new/test/java/rmi/Naming/legalRegistryNames/LegalRegistryNames.java 2014-01-24 14:23:54.704057067 +0800 @@ -28,7 +28,7 @@ * @author Dana Burns * @library ../../testlibrary * @build TestLibrary Legal LegalRegistryNames_Stub - * @run main LegalRegistryNames + * @run main/othervm LegalRegistryNames */ import java.net.InetAddress; --- old/test/java/rmi/activation/ActivationGroupDesc/checkDefaultGroupName/CheckDefaultGroupName.java 2014-01-24 14:23:58.278189886 +0800 +++ new/test/java/rmi/activation/ActivationGroupDesc/checkDefaultGroupName/CheckDefaultGroupName.java 2014-01-24 14:23:57.301057950 +0800 @@ -25,6 +25,8 @@ * @test * @bug 4252236 * @summary ActivationGroupDesc should not do early binding of default classname + * This test doesn't need to run with othervm option as all it does is + * create an ActivationGroupDesc instance, which has no side effects * @author Laird Dornin * * @library ../../../testlibrary --- old/test/java/rmi/server/UnicastRemoteObject/exportObject/GcDuringExport.java 2014-01-24 14:24:04.811158627 +0800 +++ new/test/java/rmi/server/UnicastRemoteObject/exportObject/GcDuringExport.java 2014-01-24 14:24:03.348069699 +0800 @@ -30,7 +30,7 @@ * @bug 6597112 * @summary GC'ing objects whilst being exported to RMI should not cause exceptions * @author Neil Richards , - * @run main GcDuringExport + * @run main/othervm GcDuringExport */ import java.rmi.Remote; --- old/test/sun/rmi/rmic/RMIGenerator/RmicDefault.java 2014-01-24 14:24:08.547218175 +0800 +++ new/test/sun/rmi/rmic/RMIGenerator/RmicDefault.java 2014-01-24 14:24:07.492059123 +0800 @@ -28,7 +28,7 @@ * @library ../../../../java/rmi/testlibrary * * @build StreamPipe - * @run main RmicDefault + * @run main/othervm RmicDefault */ /*