# HG changeset patch # User kzhaldyb # Date 1465925924 -7200 # Node ID 84e5f0fc211280d7f937830e3404388f7d0a7ad0 # Parent 2a8201076dd67ce6ebc72173896a1cd5947fab5b# Parent 86907793a181d58e3c7e19a67939968b7fb4f7dc Merge diff -r 86907793a181 -r 84e5f0fc2112 hotspot/test/runtime/memory/ReserveMemory.java --- 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");