8177092: [TESTBUG] JMX test on MinimalVM fails after fix for 8176533
authorrehn
Tue, 21 Mar 2017 16:36:12 +0100
changeset 44405 5bc48f22b149
parent 44404 85db662e3d1f
child 44406 a46a6c4d1dd9
8177092: [TESTBUG] JMX test on MinimalVM fails after fix for 8176533 Reviewed-by: dholmes, mlarsson
hotspot/test/runtime/MinimalVM/JMX.java
--- a/hotspot/test/runtime/MinimalVM/JMX.java	Mon Mar 20 23:49:33 2017 +0100
+++ b/hotspot/test/runtime/MinimalVM/JMX.java	Tue Mar 21 16:36:12 2017 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -47,9 +47,8 @@
                 .shouldContain("-Dcom.sun.management is not supported in this VM.")
                 .shouldHaveExitValue(1);
 
-        pb.command(new String[] { JDKToolFinder.getJDKTool("jcmd"), Long.toString(ProcessTools.getProcessId()), "VM.print_threads"});
+        pb.command(new String[] { JDKToolFinder.getJDKTool("jcmd"), "-l"});
         new OutputAnalyzer(pb.start())
-                .shouldContain("Could not find any processes matching ")
-                .shouldHaveExitValue(1);
+                .shouldNotMatch("^" + Long.toString(ProcessTools.getProcessId()) + "\\s+.*$");
     }
 }