8085973: The targeted processes in javax/management tests should be launched with -XX:+UsePerfData flag in order to work on embedded platforms
authorykantser
Mon, 08 Jun 2015 15:27:37 +0200
changeset 31455 412ba247f8df
parent 31454 4dba1183dc2f
child 31456 e5310d2138b5
8085973: The targeted processes in javax/management tests should be launched with -XX:+UsePerfData flag in order to work on embedded platforms Reviewed-by: sspitsyn
jdk/test/javax/management/remote/mandatory/notif/DeadListenerTest.java
jdk/test/sun/management/jmxremote/bootstrap/LocalManagementTest.java
--- a/jdk/test/javax/management/remote/mandatory/notif/DeadListenerTest.java	Tue Jun 09 10:11:11 2015 +0200
+++ b/jdk/test/javax/management/remote/mandatory/notif/DeadListenerTest.java	Mon Jun 08 15:27:37 2015 +0200
@@ -27,6 +27,7 @@
  * @summary Test that a listener can be removed remotely from an MBean that no longer exists.
  * @modules java.management/com.sun.jmx.remote.internal
  * @author Eamonn McManus
+ * @run main/othervm -XX:+UsePerfData DeadListenerTest
  */
 
 import com.sun.jmx.remote.internal.ServerNotifForwarder;
--- a/jdk/test/sun/management/jmxremote/bootstrap/LocalManagementTest.java	Tue Jun 09 10:11:11 2015 +0200
+++ b/jdk/test/sun/management/jmxremote/bootstrap/LocalManagementTest.java	Mon Jun 08 15:27:37 2015 +0200
@@ -21,14 +21,15 @@
  * questions.
  */
 
-import java.io.File;
 import java.lang.reflect.Method;
 import java.lang.reflect.Modifier;
 import java.util.ArrayList;
 import java.util.List;
-import java.util.concurrent.TimeUnit;
 import java.util.concurrent.atomic.AtomicReference;
 
+import jdk.testlibrary.ProcessTools;
+import jdk.testlibrary.Utils;
+
 /**
  * @test
  * @library /lib/testlibrary
@@ -39,14 +40,10 @@
  *          both agent properties and jvmstat buffer.
  * @modules java.management/sun.management
  * @build jdk.testlibrary.* TestManager TestApplication
- * @run main/othervm/timeout=300 -XX:+UsePerfData LocalManagementTest
+ * @run main/othervm/timeout=300 LocalManagementTest
  */
-
-import jdk.testlibrary.ProcessTools;
-
 public class LocalManagementTest {
     private static final String TEST_CLASSPATH = System.getProperty("test.class.path");
-    private static final String TEST_JDK = System.getProperty("test.jdk");
 
     public static void main(String[] args) throws Exception {
         int failures = 0;
@@ -96,6 +93,8 @@
 
     private static boolean doTest(String testId, String arg) throws Exception {
         List<String> args = new ArrayList<>();
+        args.add("-XX:+UsePerfData");
+        args.addAll(Utils.getVmOptions());
         args.add("-cp");
         args.add(TEST_CLASSPATH);