This commit is contained in:
Alejandro Murillo 2016-08-19 11:22:17 -07:00
commit 3fe5cc875a
4 changed files with 49 additions and 23 deletions

View File

@ -87,7 +87,12 @@ dojdbCmds()
cmd stop in ${classname}.partTwo cmd stop in ${classname}.partTwo
runToBkpt runToBkpt
cmd ignore uncaught java.lang.Throwable 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 cmd cont
cmd cont cmd cont

View File

@ -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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * 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) * @author Tim Bell (based on ClassesByName by Robert Field)
* *
* @modules java.corba * @modules jdk.jdi
* jdk.jdi
* @run build TestScaffold VMConnection TargetListener TargetAdapter * @run build TestScaffold VMConnection TargetListener TargetAdapter
* @run compile -g ClassesByName2Test.java * @run compile -g ClassesByName2Test.java
* @run driver ClassesByName2Test * @run driver ClassesByName2Test
@ -70,10 +69,14 @@ class ClassesByName2Targ {
}; };
Thread two = new Thread ("TWO") { Thread two = new Thread ("TWO") {
public void run () { public void run () {
javax.rmi.CORBA.Util.getCodebase(this.getClass()); try {
String s = String.format("%02x", 0xff);
} catch (Exception e) {
e.printStackTrace();
} }
}; }
};
two.start(); two.start();
one.start(); one.start();

View File

@ -23,7 +23,6 @@
/* /*
* @test LFSingleThreadCachingTest * @test LFSingleThreadCachingTest
* @ignore 8129523
* @bug 8046703 * @bug 8046703
* @key randomness * @key randomness
* @summary Test verifies that lambda forms are cached when run with single thread * @summary Test verifies that lambda forms are cached when run with single thread
@ -33,7 +32,7 @@
* @build LambdaFormTestCase * @build LambdaFormTestCase
* @build LFCachingTestCase * @build LFCachingTestCase
* @build LFSingleThreadCachingTest * @build LFSingleThreadCachingTest
* @run main/othervm LFSingleThreadCachingTest * @run main/othervm -XX:ReservedCodeCacheSize=128m LFSingleThreadCachingTest
*/ */
import java.lang.invoke.MethodHandle; import java.lang.invoke.MethodHandle;

View File

@ -107,6 +107,38 @@ public class BasicLauncherTest {
} }
} }
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 * @param vmArgs - vm and java arguments to launch test app
@ -151,19 +183,6 @@ public class BasicLauncherTest {
Arrays.asList(toolArgs)); 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 { public static void testHeapDump() throws IOException {
File dump = new File("jhsdb.jmap.dump." + File dump = new File("jhsdb.jmap.dump." +
System.currentTimeMillis() + ".hprof"); System.currentTimeMillis() + ".hprof");
@ -191,7 +210,7 @@ public class BasicLauncherTest {
launchCLHSDB(); launchCLHSDB();
launch("compiler detected", null, "jmap", "--clstats"); launch("compiler detected", null, "jmap", "--clstats");
launchNotOSX("No deadlocks found", null, "jstack"); launchJStack();
launch("compiler detected", null, "jmap"); launch("compiler detected", null, "jmap");
launch("Java System Properties", launch("Java System Properties",
"System Properties info not available", "jinfo"); "System Properties info not available", "jinfo");