jdk/test/sun/tools/jmap/BasicJMapTest.java
changeset 38360 fb63be22ffa6
parent 34327 50693d25f4a7
child 40686 1b855fa5c9c5
--- a/jdk/test/sun/tools/jmap/BasicJMapTest.java	Mon May 09 13:12:48 2016 +0300
+++ b/jdk/test/sun/tools/jmap/BasicJMapTest.java	Mon May 09 23:41:59 2016 +0300
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2016, 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
@@ -34,12 +34,10 @@
 
 /*
  * @test
- * @bug 6321286
  * @summary Unit test for jmap utility
  * @key intermittent
  * @library /lib/testlibrary
  * @library /test/lib/share/classes
- * @modules java.management
  * @build jdk.testlibrary.*
  * @build jdk.test.lib.hprof.*
  * @build jdk.test.lib.hprof.model.*
@@ -54,6 +52,8 @@
     public static void main(String[] args) throws Exception {
         testHisto();
         testHistoLive();
+        testFinalizerInfo();
+        testClstats();
         testDump();
         testDumpLive();
     }
@@ -68,6 +68,16 @@
         output.shouldHaveExitValue(0);
     }
 
+    private static void testFinalizerInfo() throws Exception {
+        OutputAnalyzer output = jmap("-finalizerinfo");
+        output.shouldHaveExitValue(0);
+    }
+
+    private static void testClstats() throws Exception {
+        OutputAnalyzer output = jmap("-clstats");
+        output.shouldHaveExitValue(0);
+    }
+
     private static void testDump() throws Exception {
         dump(false);
     }
@@ -105,7 +115,6 @@
 
     private static OutputAnalyzer jmap(String... toolArgs) throws Exception {
         JDKToolLauncher launcher = JDKToolLauncher.createUsingTestJDK("jmap");
-        launcher.addVMArg("-XX:+UsePerfData");
         if (toolArgs != null) {
             for (String toolArg : toolArgs) {
                 launcher.addToolArg(toolArg);