changeset 48311:d18861f20c0e

8192870: [Testbug] runtime/handshake/HandshakeTransitionTest throws NPE Reviewed-by: dholmes, rehn
author dlong
date Tue, 05 Dec 2017 11:16:03 -0800
parents 0dc66cdf4720
children 2a1413298af0
files test/hotspot/jtreg/runtime/handshake/HandshakeTransitionTest.java
diffstat 1 files changed, 9 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/test/hotspot/jtreg/runtime/handshake/HandshakeTransitionTest.java	Tue Dec 05 10:38:31 2017 -0800
+++ b/test/hotspot/jtreg/runtime/handshake/HandshakeTransitionTest.java	Tue Dec 05 11:16:03 2017 -0800
@@ -49,6 +49,14 @@
     public static void main(String[] args) throws Exception {
         String lib = System.getProperty("test.nativepath");
         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.createJavaProcessBuilder(
                     true,
@@ -60,7 +68,7 @@
                     "-XX:ConcGCThreads=1",
                     "-XX:CICompilerCount=2",
                     "-XX:+UnlockExperimentalVMOptions",
-                    (wb.getBooleanVMFlag("UseJVMCICompiler") ?  "-XX:+UseJVMCICompiler" : "-XX:-UseJVMCICompiler"),
+                    useJVMCICompilerStr,
                     "HandshakeTransitionTest$Test");