Skip to content
Permalink
Browse files
8268594: runtime/handshake tests don't need WhiteBox after AOT removal
Reviewed-by: dholmes, mseledtsov
  • Loading branch information
iignatev committed Jun 18, 2021
1 parent 9f4f039 commit 58eddc81102c233061de67a1deaa8d8fee8d5857
Showing 2 changed files with 2 additions and 26 deletions.
@@ -36,20 +36,11 @@
* @library /testlibrary /test/lib
* @build HandshakeTimeoutTest
* @run driver jdk.test.lib.helpers.ClassFileInstaller sun.hotspot.WhiteBox
* @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI HandshakeTimeoutTest
* @run main HandshakeTimeoutTest
*/

public class HandshakeTimeoutTest {
public static void main(String[] args) throws Exception {
WhiteBox wb = WhiteBox.getWhiteBox();
Boolean useJVMCICompiler = wb.getBooleanVMFlag("UseJVMCICompiler");
String useJVMCICompilerStr;
if (useJVMCICompiler != null) {
useJVMCICompilerStr = useJVMCICompiler ? "-XX:+UseJVMCICompiler" : "-XX:-UseJVMCICompiler";
} else {
// pass something innocuous
useJVMCICompilerStr = "-XX:+UnlockExperimentalVMOptions";
}
ProcessBuilder pb =
ProcessTools.createTestJvm(
"-Xbootclasspath/a:.",
@@ -63,7 +54,6 @@ public static void main(String[] args) throws Exception {
"-XX:+UnlockExperimentalVMOptions",
"-XX:HandshakeTimeout=50",
"-XX:-CreateCoredumpOnCrash",
useJVMCICompilerStr,
"HandshakeTimeoutTest$Test");

OutputAnalyzer output = ProcessTools.executeProcess(pb);
@@ -26,31 +26,19 @@
import jdk.test.lib.process.ProcessTools;
import jdk.test.lib.process.OutputAnalyzer;

import sun.hotspot.WhiteBox;

/*
* @test HandshakeTransitionTest
* @summary This does a sanity test of the poll in the native wrapper.
* @requires vm.debug
* @library /testlibrary /test/lib
* @build HandshakeTransitionTest
* @run driver jdk.test.lib.helpers.ClassFileInstaller sun.hotspot.WhiteBox
* @run main/othervm/native -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI HandshakeTransitionTest
* @run main/native HandshakeTransitionTest
*/

public class HandshakeTransitionTest {
public static native void someTime(int ms);

public static void main(String[] args) throws Exception {
WhiteBox wb = WhiteBox.getWhiteBox();
Boolean useJVMCICompiler = wb.getBooleanVMFlag("UseJVMCICompiler");
String useJVMCICompilerStr;
if (useJVMCICompiler != null) {
useJVMCICompilerStr = useJVMCICompiler ? "-XX:+UseJVMCICompiler" : "-XX:-UseJVMCICompiler";
} else {
// pass something innocuous
useJVMCICompilerStr = "-XX:+UnlockExperimentalVMOptions";
}
ProcessBuilder pb =
ProcessTools.createTestJvm(
"-Djava.library.path=" + Utils.TEST_NATIVE_PATH,
@@ -61,8 +49,6 @@ public static void main(String[] args) throws Exception {
"-XX:ParallelGCThreads=1",
"-XX:ConcGCThreads=1",
"-XX:CICompilerCount=2",
"-XX:+UnlockExperimentalVMOptions",
useJVMCICompilerStr,
"HandshakeTransitionTest$Test");

OutputAnalyzer output = ProcessTools.executeProcess(pb);

0 comments on commit 58eddc8

Please sign in to comment.