Merge jdk-12+18
authorbobv
Wed, 31 Oct 2018 16:27:31 -0400
changeset 52359 e38473506688
parent 52358 c42cd17e8e64 (diff)
parent 52357 e2478be9c682 (current diff)
child 52360 9cc7df3372b0
Merge
test/hotspot/jtreg/runtime/ClassUnload/UnloadInterfaceTest.java
test/hotspot/jtreg/runtime/ClassUnload/test/ImplementorClass.java
test/hotspot/jtreg/runtime/ClassUnload/test/Interface.java
--- a/test/hotspot/jtreg/runtime/ReservedStack/ReservedStackTest.java	Wed Oct 31 13:14:52 2018 -0700
+++ b/test/hotspot/jtreg/runtime/ReservedStack/ReservedStackTest.java	Wed Oct 31 16:27:31 2018 -0400
@@ -232,6 +232,19 @@
         }
     }
 
+    private static boolean isAlwaysSupportedPlatform() {
+        return Platform.isAix() ||
+            (Platform.isLinux() &&
+             (Platform.isPPC() || Platform.isS390x() || Platform.isX64() ||
+              Platform.isX86() || Platform.isAArch64())) ||
+            Platform.isOSX() ||
+            Platform.isSolaris();
+    }
+
+    private static boolean isNeverSupportedPlatform() {
+        return !isAlwaysSupportedPlatform();
+    }
+
     private static boolean isSupportedPlatform;
 
     private static void initIsSupportedPlatform() throws Exception {
@@ -256,11 +269,19 @@
 
         // Do a sanity check. Some platforms we know are always supported. Make sure
         // we didn't determine that one of those platforms is not supported.
-        if (!isSupportedPlatform) {
+        if (!isSupportedPlatform && isAlwaysSupportedPlatform()) {
             String msg  = "This platform should be supported: " + Platform.getOsArch();
             System.err.println("FAILED: " +  msg);
             throw new RuntimeException(msg);
         }
+
+        // And some platforms we know are never supported. Make sure
+        // we didn't determine that one of those platforms is supported.
+        if (isSupportedPlatform && isNeverSupportedPlatform()) {
+            String msg  = "This platform should not be supported: " + Platform.getOsArch();
+            System.err.println("FAILED: " +  msg);
+            throw new RuntimeException(msg);
+        }
     }
 
     public static void main(String[] args) throws Exception {