diff -r f38329fe8055 -r 3aaaa5370999 test/jdk/java/io/FileOutputStream/AtomicAppend.java --- a/test/jdk/java/io/FileOutputStream/AtomicAppend.java Mon Apr 30 21:17:37 2018 +0200 +++ b/test/jdk/java/io/FileOutputStream/AtomicAppend.java Mon Apr 30 13:40:39 2018 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2007, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2007, 2018, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -25,6 +25,9 @@ * @test * @bug 6631352 * @summary Check that appends are atomic + * @library /test/lib + * @build jdk.test.lib.Platform + * @run main AtomicAppend */ import java.io.File; @@ -33,6 +36,8 @@ import java.util.concurrent.ExecutorService; import java.util.concurrent.TimeUnit; +import jdk.test.lib.Platform; + public class AtomicAppend { // Before the fix for // 6631352: Implement atomic append mode using FILE_APPEND_DATA (win) @@ -73,7 +78,17 @@ if (x == null ? y == null : x.equals(y)) pass(); else fail(x + " not equal to " + y);} public static void main(String[] args) throws Throwable { - new AtomicAppend().instanceMain(args);} + if (Platform.isOSX()) { + final String version = "10.13"; + int ineq = Platform.compareOsVersion(version); + if (ineq >= 0) { + System.out.format("Skipping test for macOS version %s >= %s%n", + Platform.getOsVersion(), version); + return; + } + } + new AtomicAppend().instanceMain(args); + } void instanceMain(String[] args) throws Throwable { try {test(args);} catch (Throwable t) {unexpected(t);} System.out.printf("%nPassed = %d, failed = %d%n%n", passed, failed);