< prev index next >

test/hotspot/jtreg/serviceability/sa/sadebugd/SADebugDTest.java

Print this page

        

*** 21,33 **** --- 21,35 ---- * questions. */ /** * @test + * @bug 8163805 8224252 * @summary Checks that the jshdb debugd utility sucessfully starts * and tries to attach to a running process * @requires vm.hasSAandCanAttach + * @requires os.family != "windows" * @modules java.base/jdk.internal.misc * @library /test/lib * * @run main/othervm SADebugDTest */
*** 38,48 **** import jdk.test.lib.JDKToolLauncher; import static jdk.test.lib.process.ProcessTools.startProcess; public class SADebugDTest { ! private static final String GOLDEN = "Attaching to process"; public static void main(String[] args) throws Exception { LingeredApp app = null; try { --- 40,50 ---- import jdk.test.lib.JDKToolLauncher; import static jdk.test.lib.process.ProcessTools.startProcess; public class SADebugDTest { ! private static final String GOLDEN = "Debugger attached"; public static void main(String[] args) throws Exception { LingeredApp app = null; try {
*** 60,73 **** Process debugd = startProcess("debugd", pb, null, l -> l.contains(GOLDEN), 0, TimeUnit.SECONDS); // If we are here, this means we have received the golden line and the test has passed // The debugd remains running, we have to kill it debugd.destroy(); } finally { - if (app != null) { LingeredApp.stopApp(app); } - } } } --- 62,74 ---- Process debugd = startProcess("debugd", pb, null, l -> l.contains(GOLDEN), 0, TimeUnit.SECONDS); // If we are here, this means we have received the golden line and the test has passed // The debugd remains running, we have to kill it debugd.destroy(); + debugd.waitFor(); } finally { LingeredApp.stopApp(app); } } }
< prev index next >