< prev index next >

test/hotspot/jtreg/serviceability/sa/ClhsdbCDSCore.java

Print this page

        

@@ -21,12 +21,12 @@
  * questions.
  */
 
 /**
  * @test
- * @bug 8174994
- * @summary Test the clhsdb commands 'printmdo', 'printall' on a CDS enabled corefile.
+ * @bug 8174994 8200613
+ * @summary Test the clhsdb commands 'printmdo', 'printall', 'jstack' on a CDS enabled corefile.
  * @requires vm.cds
  * @requires vm.hasSA
  * @requires os.family != "windows"
  * @requires vm.flavor == "server"
  * @library /test/lib

@@ -77,11 +77,10 @@
         try {
             CDSOptions opts = (new CDSOptions()).setArchiveName(SHARED_ARCHIVE_NAME);
             CDSTestUtils.createArchiveAndCheck(opts);
 
             String[] jArgs = {
-                "-Xmx512m",
                 "-XX:+UnlockDiagnosticVMOptions",
                 "-XX:SharedArchiveFile=" + SHARED_ARCHIVE_NAME,
                 "-XX:+CreateCoredumpOnCrash",
                 "-Xshare:auto",
                 "-XX:+ProfileInterpreter",

@@ -154,11 +153,11 @@
                 // CDS archive is not mapped. Skip the rest of the test.
                 cleanup();
                 throw new SkippedException("The CDS archive is not mapped");
             }
 
-            cmds = List.of("printmdo -a", "printall");
+            cmds = List.of("printmdo -a", "printall", "jstack -v");
 
             Map<String, List<String>> expStrMap = new HashMap<>();
             Map<String, List<String>> unExpStrMap = new HashMap<>();
             expStrMap.put("printmdo -a", List.of(
                 "CounterData",

@@ -180,10 +179,15 @@
             unExpStrMap.put("printall", List.of(
                 "sun.jvm.hotspot.types.WrongTypeException",
                 "illegal code",
                 "Failure occurred at bci",
                 "No suitable match for type of address"));
+            expStrMap.put("jstack -v", List.of(
+                "Common-Cleaner",
+                "Method*"));
+            unExpStrMap.put("jstack -v", List.of(
+                "sun.jvm.hotspot.debugger.UnmappedAddressException"));
             test.runOnCore(TEST_CDS_CORE_FILE_NAME, cmds, expStrMap, unExpStrMap);
         } catch (SkippedException e) {
             throw e;
         } catch (Exception ex) {
             throw new RuntimeException("Test ERROR " + ex, ex);
< prev index next >