8008454: test/runtime/NMT/PrintNMTStatistics is broken

Sun, 24 Mar 2013 09:11:55 +0100

author
ctornqvi
date
Sun, 24 Mar 2013 09:11:55 +0100
changeset 4814
c342fbdf8a70
parent 4812
14509df4cd63
child 4815
9c8e53c7bed0

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

test/runtime/NMT/PrintNMTStatistics.java file | annotate | diff | comparison | revisions
     1.1 --- a/test/runtime/NMT/PrintNMTStatistics.java	Thu Mar 21 20:46:46 2013 -0700
     1.2 +++ b/test/runtime/NMT/PrintNMTStatistics.java	Sun Mar 24 09:11:55 2013 +0100
     1.3 @@ -27,7 +27,9 @@
     1.4   * @bug 8005936
     1.5   * @summary Make sure PrintNMTStatistics works on normal JVM exit
     1.6   * @library /testlibrary /testlibrary/whitebox
     1.7 - * @run compile PrintNMTStatistics.java
     1.8 + * @build PrintNMTStatistics
     1.9 + * @run main ClassFileInstaller sun.hotspot.WhiteBox
    1.10 + * @run main PrintNMTStatistics
    1.11   */
    1.12  
    1.13  import com.oracle.java.testlibrary.*;
    1.14 @@ -52,13 +54,15 @@
    1.15  
    1.16      ProcessBuilder pb = ProcessTools.createJavaProcessBuilder(
    1.17          "-XX:+UnlockDiagnosticVMOptions",
    1.18 +        "-Xbootclasspath/a:.",
    1.19 +        "-XX:+WhiteBoxAPI",
    1.20          "-XX:NativeMemoryTracking=summary",
    1.21 -        "+XX:+PrintNMTStatistics",
    1.22 +        "-XX:+PrintNMTStatistics",
    1.23          "PrintNMTStatistics",
    1.24          "test");
    1.25  
    1.26      OutputAnalyzer output = new OutputAnalyzer(pb.start());
    1.27 -    output.shouldContain("Java Heap  (reserved=");
    1.28 +    output.shouldContain("Java Heap (reserved=");
    1.29      output.shouldNotContain("error");
    1.30      output.shouldNotContain("warning");
    1.31      output.shouldHaveExitValue(0);

mercurial