< prev index next >
test/jdk/java/nio/channels/FileChannel/directio/DirectIOTest.java
Print this page
rev 59383 : [mq]: final
*** 1,7 ****
/*
! * Copyright (c) 2017, 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
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
--- 1,7 ----
/*
! * Copyright (c) 2017, 2020, 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
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*** 23,34 ****
/*
* @test
* @bug 8164900
* @summary Test for ExtendedOpenOption.DIRECT flag
! * @requires (os.family == "linux" | os.family == "solaris"
! * | os.family == "aix")
* @library /test/lib
* @build jdk.test.lib.Platform
* @run main/native DirectIOTest
*/
--- 23,33 ----
/*
* @test
* @bug 8164900
* @summary Test for ExtendedOpenOption.DIRECT flag
! * @requires (os.family == "linux" | os.family == "aix")
* @library /test/lib
* @build jdk.test.lib.Platform
* @run main/native DirectIOTest
*/
*** 78,98 ****
return Files.createTempFile(
Paths.get(System.getProperty("test.dir", ".")), "test", null);
}
public static boolean isDirectIOSupportedByFS(Path p) throws Exception {
! boolean supported = true;
! if (Platform.isSolaris()) {
! String fsType = Files.getFileStore(p).type();
! if (!fsType.equals("nfs") && !fsType.equals("ufs")) {
! // print a message and return without failing
! System.out.format("Skipping test: file system type %s of "
! + "FileStore of %s is neither nfs nor ufs.%n", fsType, p);
! supported = false;
! }
! }
! return supported;
}
private static boolean isFileInCache(Path p) {
String path = p.toString();
return isFileInCache0(SIZE, path);
--- 77,87 ----
return Files.createTempFile(
Paths.get(System.getProperty("test.dir", ".")), "test", null);
}
public static boolean isDirectIOSupportedByFS(Path p) throws Exception {
! return true;
}
private static boolean isFileInCache(Path p) {
String path = p.toString();
return isFileInCache0(SIZE, path);
< prev index next >