changeset 12285:8c733ec95660

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
author ykantser
date Mon, 08 Jun 2015 15:27:37 +0200
parents 5e50e2411d2e
children 95d0e03627d3
files test/javax/management/remote/mandatory/notif/DeadListenerTest.java test/sun/management/jmxremote/bootstrap/LocalManagementTest.java
diffstat 2 files changed, 7 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/test/javax/management/remote/mandatory/notif/DeadListenerTest.java	Tue Jun 09 10:11:11 2015 +0200
+++ b/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/test/sun/management/jmxremote/bootstrap/LocalManagementTest.java	Tue Jun 09 10:11:11 2015 +0200
+++ b/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);