< prev index next >

test/hotspot/jtreg/runtime/SharedArchiveFile/serviceability/ReplaceCriticalClasses.java

Print this page

        

@@ -1,7 +1,7 @@
 /*
- * Copyright (c) 2018, 2019, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2018, 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
  * under the terms of the GNU General Public License version 2 only, as
  * published by the Free Software Foundation.

@@ -45,19 +45,10 @@
         rcc.process(args);
     }
 
     public void process(String args[]) throws Throwable {
         if (args.length == 0) {
-            // Dump the shared archive in case it was not generated during the JDK build.
-            // Put the archive at separate file to avoid clashes with concurrent tests.
-            CDSOptions opts = new CDSOptions()
-                .setXShareMode("dump")
-                .setArchiveName(ReplaceCriticalClasses.class.getName() + ".jsa")
-                .setUseVersion(false)
-                .addSuffix("-showversion");
-            CDSTestUtils.run(opts).assertNormalExit("");
-
             launchChildProcesses(getTests());
         } else if (args.length == 3 && args[0].equals("child")) {
             Class klass = Class.forName(args[2].replace("/", "."));
             if (args[1].equals("-shared")) {
                 testInChild(true, klass);

@@ -159,11 +150,11 @@
         // to be updated. (You'd see the test case with java/util/Locale staring to fail).
         String agent = "-agentlib:SimpleClassFileLoadHook=" + early + klassName + ",XXX,XXX";
 
         CDSOptions opts = (new CDSOptions())
             .setXShareMode("auto")
-            .setArchiveName(ReplaceCriticalClasses.class.getName() + ".jsa")
+            .setUseSystemArchive(true)
             .setUseVersion(false)
             .addSuffix("-showversion",
                        "-Xlog:cds",
                        "-XX:+UnlockDiagnosticVMOptions",
                        agent,
< prev index next >