< prev index next >
test/hotspot/jtreg/serviceability/sa/sadebugd/SADebugDTest.java
Print this page
@@ -21,13 +21,15 @@
* 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,11 +40,11 @@
import jdk.test.lib.JDKToolLauncher;
import static jdk.test.lib.process.ProcessTools.startProcess;
public class SADebugDTest {
- private static final String GOLDEN = "Attaching to process";
+ private static final String GOLDEN = "Debugger attached";
public static void main(String[] args) throws Exception {
LingeredApp app = null;
try {
@@ -60,14 +62,13 @@
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 {
- if (app != null) {
LingeredApp.stopApp(app);
}
- }
}
}
< prev index next >