# HG changeset patch # User amurillo # Date 1458695800 25200 # Tue Mar 22 18:16:40 2016 -0700 # Node ID bbc3d06f83031bf91bbe6fafc862cd6c826277d1 # Parent 8e0924cea35b44ec01a6510f9d15fead35c4d309 8152483: Fix a couple of tests that are being incorrectly run on C1 after jigsaw M3 Reviewed-by: tbd diff --git a/test/compiler/unsafe/UnsafeGetConstantField.java b/test/compiler/unsafe/UnsafeGetConstantField.java --- a/test/compiler/unsafe/UnsafeGetConstantField.java +++ b/test/compiler/unsafe/UnsafeGetConstantField.java @@ -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"); } diff --git a/test/compiler/unsafe/UnsafeGetStableArrayElement.java b/test/compiler/unsafe/UnsafeGetStableArrayElement.java --- a/test/compiler/unsafe/UnsafeGetStableArrayElement.java +++ b/test/compiler/unsafe/UnsafeGetStableArrayElement.java @@ -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);