提交 a725b893 编写于 作者: C ctornqvi

8008454: test/runtime/NMT/PrintNMTStatistics is broken

Summary: Added @run tag so that it actually runs the test, also fixed broken command line and incorrect parsing. Also reviewed by gerard.ziemski@oracle.com
Reviewed-by: mgerdin, zgu
上级 ef0893be
......@@ -27,7 +27,9 @@
* @bug 8005936
* @summary Make sure PrintNMTStatistics works on normal JVM exit
* @library /testlibrary /testlibrary/whitebox
* @run compile PrintNMTStatistics.java
* @build PrintNMTStatistics
* @run main ClassFileInstaller sun.hotspot.WhiteBox
* @run main PrintNMTStatistics
*/
import com.oracle.java.testlibrary.*;
......@@ -52,13 +54,15 @@ public class PrintNMTStatistics {
ProcessBuilder pb = ProcessTools.createJavaProcessBuilder(
"-XX:+UnlockDiagnosticVMOptions",
"-Xbootclasspath/a:.",
"-XX:+WhiteBoxAPI",
"-XX:NativeMemoryTracking=summary",
"+XX:+PrintNMTStatistics",
"-XX:+PrintNMTStatistics",
"PrintNMTStatistics",
"test");
OutputAnalyzer output = new OutputAnalyzer(pb.start());
output.shouldContain("Java Heap (reserved=");
output.shouldContain("Java Heap (reserved=");
output.shouldNotContain("error");
output.shouldNotContain("warning");
output.shouldHaveExitValue(0);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册