8155009: [TESTBUG] jstack subtest of BasicLauncherTest should not be executed under OS X
authordsamersoff
Fri, 03 Jun 2016 13:07:00 +0300
changeset 38957 f94639fe4324
parent 38956 cf2c4bfba78a
child 38958 d8a4ce6d05ad
child 39323 271a3038d6ab
8155009: [TESTBUG] jstack subtest of BasicLauncherTest should not be executed under OS X Summary: Detect OS X and skip part of the test Reviewed-by: sspitsyn, rehn
jdk/test/sun/tools/jhsdb/BasicLauncherTest.java
--- a/jdk/test/sun/tools/jhsdb/BasicLauncherTest.java	Fri Jun 03 10:05:04 2016 +0200
+++ b/jdk/test/sun/tools/jhsdb/BasicLauncherTest.java	Fri Jun 03 13:07:00 2016 +0300
@@ -146,6 +146,16 @@
         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 @@
 
         launchCLHSDB();
 
-        launch("No deadlocks found", "jstack");
+        launchNotOSX("No deadlocks found", "jstack");
         launch("compiler detected", "jmap");
         launch("Java System Properties", "jinfo");
         launch("java.threads", "jsnap");