Merge
authorkzhaldyb
Tue, 14 Jun 2016 19:38:44 +0200
changeset 39281 84e5f0fc2112
parent 39279 2a8201076dd6 (diff)
parent 39280 86907793a181 (current diff)
child 39284 d504ca981ccf
child 39390 edf6a424a8b7
Merge
--- a/hotspot/test/runtime/memory/ReserveMemory.java	Tue Jun 14 19:15:27 2016 +0300
+++ b/hotspot/test/runtime/memory/ReserveMemory.java	Tue Jun 14 19:38:44 2016 +0200
@@ -21,10 +21,12 @@
  * questions.
  */
 
+// Aix commits on touch, so this test won't work.
 /*
  * @test
  * @key regression
  * @bug 8012015
+ * @requires !(os.family == "aix")
  * @summary Make sure reserved (but uncommitted) memory is not accessible
  * @library /testlibrary /test/lib
  * @modules java.base/jdk.internal.misc
@@ -36,18 +38,11 @@
  */
 
 import jdk.test.lib.*;
+import jdk.test.lib.Platform;
 
 import sun.hotspot.WhiteBox;
 
 public class ReserveMemory {
-  private static boolean isWindows() {
-    return System.getProperty("os.name").toLowerCase().startsWith("win");
-  }
-
-  private static boolean isOsx() {
-    return System.getProperty("os.name").toLowerCase().startsWith("mac");
-  }
-
   public static void main(String args[]) throws Exception {
     if (args.length > 0) {
       WhiteBox.getWhiteBox().readReservedMemory();
@@ -66,9 +61,9 @@
           "test");
 
     OutputAnalyzer output = new OutputAnalyzer(pb.start());
-    if (isWindows()) {
+    if (Platform.isWindows()) {
       output.shouldContain("EXCEPTION_ACCESS_VIOLATION");
-    } else if (isOsx()) {
+    } else if (Platform.isOSX()) {
       output.shouldContain("SIGBUS");
     } else {
       output.shouldContain("SIGSEGV");