RFR(9): 8177092: [TESTBUG] JMX test on MinimalVM fails after fix for 8176533

Robbin Ehn robbin.ehn at oracle.com
Mon Mar 20 14:40:30 UTC 2017

Hi all, please review,

8156537 added a verification that <pid> was an attachable VM.
The verification caused a regression because of an underlying bug in an AttachProvider.
So the verification was removed for pid case in 8176533.
It will be put back when we have fixed: 8176828 (the faulty AttachProvider)

This test was written when we had the verification of VM before blasting SIGQUIT and waiting for socket to open.
Since we do not verify that the process is suppose to be attachable, jcmd will think that socket should open, which leads to timeout in jcmd for all non-attachable processes.

The test is suppose to verify that the minimal VM do not have attach API.
I change the test to just list attachable VM's and verify that this minimal VM is not among them.

Issue: https://bugs.openjdk.java.net/browse/JDK-8177092

Tested locally and with rbt.



diff -r 03f4b62f3562 test/runtime/MinimalVM/JMX.java
--- a/test/runtime/MinimalVM/JMX.java	Wed Mar 15 18:18:04 2017 -0700
+++ b/test/runtime/MinimalVM/JMX.java	Mon Mar 20 15:22:44 2017 +0100
@@ -49,6 +49,5 @@

-        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);
+                .shouldNotContain(Long.toString(ProcessTools.getProcessId()));

More information about the hotspot-runtime-dev mailing list