8154258: [TESTBUG] Various serviceability tests fail compilation

Replace sun.misc.Unsafe with jdk.internal.misc.Unsafe

Reviewed-by: chegar, kvn
This commit is contained in:
Dmitry Samersoff 2016-05-01 12:47:00 +03:00
parent da0fe9d476
commit 85deb5aa7e
403 changed files with 444 additions and 91 deletions

View file

@ -33,7 +33,7 @@
*/
import jdk.test.lib.*;
import sun.misc.Unsafe;
import jdk.internal.misc.Unsafe;
public class CreateCoredumpOnCrash {
private static class Crasher {
@ -56,7 +56,7 @@ public class CreateCoredumpOnCrash {
public static OutputAnalyzer runTest(String option) throws Exception {
return new OutputAnalyzer(
ProcessTools.createJavaProcessBuilder(
"-Xmx64m", "-XX:-TransmitErrorReport", option, Crasher.class.getName())
"-Xmx64m", "-XX:-TransmitErrorReport", "-XaddExports:java.base/jdk.internal.misc=ALL-UNNAMED", option, Crasher.class.getName())
.start());
}
}

View file

@ -27,6 +27,7 @@
* @bug 8015884
* @summary Exercise HotSpot error handling code by invoking java with
* -XX:ErrorHandlerTest option to cause an error report. Check the results.
* @modules java.base/jdk.internal.misc
* @library /testlibrary
* @run driver ErrorHandler
*/

View file

@ -36,7 +36,7 @@
import jdk.test.lib.*;
import sun.misc.Unsafe;
import jdk.internal.misc.Unsafe;
import jdk.test.lib.Utils;
public class ProblematicFrameTest {

View file

@ -35,6 +35,7 @@ import jdk.test.lib.ProcessTools;
* @test
* @bug 8074552
* @summary SafeFetch32 and SafeFetchN do not work in error handling
* @modules java.base/jdk.internal.misc
* @library /testlibrary
* @author Thomas Stuefe (SAP)
*/

View file

@ -24,6 +24,7 @@
/*
* @test TestCrashOnOutOfMemoryError
* @summary Test using -XX:+CrashOnOutOfMemoryError
* @modules java.base/jdk.internal.misc
* @library /testlibrary
* @build jdk.test.lib.*
* @run driver TestCrashOnOutOfMemoryError

View file

@ -24,6 +24,7 @@
/*
* @test TestExitOnOutOfMemoryError
* @summary Test using -XX:ExitOnOutOfMemoryError
* @modules java.base/jdk.internal.misc
* @library /testlibrary
* @build jdk.test.lib.*
* @run driver TestExitOnOutOfMemoryError

View file

@ -24,6 +24,7 @@
/*
* @test TestOnError
* @summary Test using -XX:OnError=<cmd>
* @modules java.base/jdk.internal.misc
* @library /testlibrary
* @build TestOnError
* @run main TestOnError

View file

@ -24,6 +24,7 @@
/*
* @test TestOnOutOfMemoryError
* @summary Test using -XX:OnOutOfMemoryError=<cmd>
* @modules java.base/jdk.internal.misc
* @library /testlibrary
* @build TestOnOutOfMemoryError
* @run main TestOnOutOfMemoryError