8152483: Fix a couple of tests that are being incorrectly run on C1 after jigsaw M3
authoramurillo
Tue, 22 Mar 2016 18:41:09 -0700
changeset 36617 390e8993b88e
parent 36616 5172e3dd60f2
child 36618 5531985950c0
child 36812 4f96f15e4a46
child 37179 4dbcb3a642d2
8152483: Fix a couple of tests that are being incorrectly run on C1 after jigsaw M3 Reviewed-by: ctornqvi, kvn
hotspot/test/compiler/unsafe/UnsafeGetConstantField.java
hotspot/test/compiler/unsafe/UnsafeGetStableArrayElement.java
--- a/hotspot/test/compiler/unsafe/UnsafeGetConstantField.java	Tue Mar 22 17:04:25 2016 +0000
+++ b/hotspot/test/compiler/unsafe/UnsafeGetConstantField.java	Tue Mar 22 18:41:09 2016 -0700
@@ -58,6 +58,7 @@
 import jdk.internal.org.objectweb.asm.Type;
 import jdk.internal.vm.annotation.Stable;
 import jdk.test.lib.Asserts;
+import jdk.test.lib.Platform;
 import jdk.internal.misc.Unsafe;
 
 import java.io.IOException;
@@ -73,9 +74,11 @@
     static final Unsafe U = Unsafe.getUnsafe();
 
     public static void main(String[] args) {
-        testUnsafeGetAddress();
-        testUnsafeGetField();
-        testUnsafeGetFieldUnaligned();
+        if (Platform.isServer()) {
+            testUnsafeGetAddress();
+            testUnsafeGetField();
+            testUnsafeGetFieldUnaligned();
+        }
         System.out.println("TEST PASSED");
     }
 
--- a/hotspot/test/compiler/unsafe/UnsafeGetStableArrayElement.java	Tue Mar 22 17:04:25 2016 +0000
+++ b/hotspot/test/compiler/unsafe/UnsafeGetStableArrayElement.java	Tue Mar 22 18:41:09 2016 -0700
@@ -43,6 +43,7 @@
 
 import static jdk.internal.misc.Unsafe.*;
 import static jdk.test.lib.Asserts.*;
+import static jdk.test.lib.Platform;
 
 public class UnsafeGetStableArrayElement {
     @Stable static final boolean[] STABLE_BOOLEAN_ARRAY = new boolean[16];
@@ -219,6 +220,12 @@
     }
 
     public static void main(String[] args) throws Exception {
+        if (Platform.isServer()) {
+            test();
+        }
+    }
+
+    static void test() throws Exception {
         // boolean[], aligned accesses
         testMatched(   Test::testZ_Z, Test::changeZ);
         testMismatched(Test::testZ_B, Test::changeZ);