Merge
authoramurillo
Fri, 19 Aug 2016 11:22:17 -0700
changeset 40469 15567343b987
parent 40413 14b3d338ebe0 (current diff)
parent 40468 ae9bae97a312 (diff)
child 40470 77232505c496
child 40687 03446004f80b
Merge
--- a/jdk/test/com/sun/jdi/CatchPatternTest.sh	Thu Aug 18 17:51:40 2016 -0400
+++ b/jdk/test/com/sun/jdi/CatchPatternTest.sh	Fri Aug 19 11:22:17 2016 -0700
@@ -87,7 +87,12 @@
    cmd stop in ${classname}.partTwo
    runToBkpt
    cmd ignore uncaught java.lang.Throwable
-   cmd catch all java.lang.I*
+   # Instead of matching java.lang.I* we use two more specific
+   # patterns here. The reason is to avoid matching IncompatibleClassChangeError
+   # (or the subclass NoSuchMethodError) thrown by the
+   # java.lang.invoke infrastructure.
+   cmd catch all java.lang.Il*
+   cmd catch all java.lang.Ind*
    cmd cont
    cmd cont
    cmd cont
--- a/jdk/test/com/sun/jdi/ClassesByName2Test.java	Thu Aug 18 17:51:40 2016 -0400
+++ b/jdk/test/com/sun/jdi/ClassesByName2Test.java	Fri Aug 19 11:22:17 2016 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2001, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 2016, 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
@@ -28,8 +28,7 @@
  *
  *  @author Tim Bell (based on ClassesByName by Robert Field)
  *
- *  @modules java.corba
- *           jdk.jdi
+ *  @modules jdk.jdi
  *  @run build TestScaffold VMConnection TargetListener TargetAdapter
  *  @run compile -g ClassesByName2Test.java
  *  @run driver ClassesByName2Test
@@ -70,10 +69,14 @@
                 };
 
             Thread two = new Thread ("TWO") {
-                    public void run () {
-                        javax.rmi.CORBA.Util.getCodebase(this.getClass());
+                public void run () {
+                    try {
+                        String s = String.format("%02x", 0xff);
+                    } catch (Exception e) {
+                        e.printStackTrace();
                     }
-                };
+                }
+            };
 
             two.start();
             one.start();
--- a/jdk/test/java/lang/invoke/LFCaching/LFSingleThreadCachingTest.java	Thu Aug 18 17:51:40 2016 -0400
+++ b/jdk/test/java/lang/invoke/LFCaching/LFSingleThreadCachingTest.java	Fri Aug 19 11:22:17 2016 -0700
@@ -23,7 +23,6 @@
 
 /*
  * @test LFSingleThreadCachingTest
- * @ignore 8129523
  * @bug 8046703
  * @key randomness
  * @summary Test verifies that lambda forms are cached when run with single thread
@@ -33,7 +32,7 @@
  * @build LambdaFormTestCase
  * @build LFCachingTestCase
  * @build LFSingleThreadCachingTest
- * @run main/othervm LFSingleThreadCachingTest
+ * @run main/othervm -XX:ReservedCodeCacheSize=128m LFSingleThreadCachingTest
  */
 
 import java.lang.invoke.MethodHandle;
--- a/jdk/test/sun/tools/jhsdb/BasicLauncherTest.java	Thu Aug 18 17:51:40 2016 -0400
+++ b/jdk/test/sun/tools/jhsdb/BasicLauncherTest.java	Fri Aug 19 11:22:17 2016 -0700
@@ -107,6 +107,38 @@
         }
     }
 
+    public static void launchJStack() 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;
+        }
+
+        System.out.println("Starting LingeredApp");
+        try {
+            theApp = LingeredApp.startApp(Arrays.asList("-Xmx256m"));
+
+            System.out.println("Starting jstack against " + theApp.getPid());
+            JDKToolLauncher launcher = createSALauncher();
+
+            launcher.addToolArg("jstack");
+            launcher.addToolArg("--pid=" + Long.toString(theApp.getPid()));
+
+            ProcessBuilder processBuilder = new ProcessBuilder(launcher.getCommand());
+            OutputAnalyzer output = ProcessTools.executeProcess(processBuilder);;
+            output.shouldContain("No deadlocks found");
+            output.shouldNotContain("illegal bci");
+            output.shouldNotContain("AssertionFailure");
+            output.shouldHaveExitValue(0);
+
+        } catch (Exception ex) {
+            throw new RuntimeException("Test ERROR " + ex, ex);
+        } finally {
+            LingeredApp.stopApp(theApp);
+        }
+    }
+
     /**
      *
      * @param vmArgs  - vm and java arguments to launch test app
@@ -151,19 +183,6 @@
                                                        Arrays.asList(toolArgs));
     }
 
-    public static void launchNotOSX(String expectedMessage,
-                              String unexpectedMessage, 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;
-        }
-
-        launch(expectedMessage, unexpectedMessage, toolArgs);
-    }
-
     public static void testHeapDump() throws IOException {
         File dump = new File("jhsdb.jmap.dump." +
                              System.currentTimeMillis() + ".hprof");
@@ -191,7 +210,7 @@
         launchCLHSDB();
 
         launch("compiler detected", null, "jmap", "--clstats");
-        launchNotOSX("No deadlocks found", null, "jstack");
+        launchJStack();
         launch("compiler detected", null, "jmap");
         launch("Java System Properties",
                "System Properties info not available", "jinfo");