From f29ed63213267e973c52b3cfaa40c06a7a704129 Mon Sep 17 00:00:00 2001 From: Dmitry Samersoff Date: Fri, 3 Jun 2016 13:07:00 +0300 Subject: [PATCH] 8155009: [TESTBUG] jstack subtest of BasicLauncherTest should not be executed under OS X Detect OS X and skip part of the test Reviewed-by: sspitsyn, rehn --- jdk/test/sun/tools/jhsdb/BasicLauncherTest.java | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/jdk/test/sun/tools/jhsdb/BasicLauncherTest.java b/jdk/test/sun/tools/jhsdb/BasicLauncherTest.java index 6d8d59dd455..04701afbbd9 100644 --- a/jdk/test/sun/tools/jhsdb/BasicLauncherTest.java +++ b/jdk/test/sun/tools/jhsdb/BasicLauncherTest.java @@ -146,6 +146,16 @@ public class BasicLauncherTest { launch(expectedMessage, Arrays.asList(toolArgs)); } + public static void launchNotOSX(String expectedMessage, String... toolArgs) + throws IOException { + + if (Platform.isOSX()) { + // Coredump stackwalking is not implemented for Darwin + System.out.println("This test is not expected to work on OS X. Skipping"); + return; + } + } + public static void testHeapDump() throws IOException { File dump = new File("jhsdb.jmap.dump." + System.currentTimeMillis() + ".hprof"); @@ -172,7 +182,7 @@ public class BasicLauncherTest { launchCLHSDB(); - launch("No deadlocks found", "jstack"); + launchNotOSX("No deadlocks found", "jstack"); launch("compiler detected", "jmap"); launch("Java System Properties", "jinfo"); launch("java.threads", "jsnap");