File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed
test/jdk/java/nio/channels/FileChannel Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change 2525 * @bug 8054029
2626 * @requires (os.family == "linux")
2727 * @summary FileChannel.size() should be equal to RandomAccessFile.size() and > 0 for block devs on Linux
28+ * @library /test/lib
2829 */
2930
3031import java .io .RandomAccessFile ;
3637
3738import static java .nio .file .StandardOpenOption .*;
3839
40+ import jtreg .SkippedException ;
3941
4042public class BlockDeviceSize {
4143 private static final List <String > BLK_FNAMES = List .of ("/dev/sda1" , "/dev/nvme0n1" , "/dev/xvda1" ) ;
@@ -61,7 +63,7 @@ public static void main(String[] args) throws Throwable {
6163 System .err .println ("File " + blkFname + " not found." +
6264 " Skipping test" );
6365 } catch (AccessDeniedException ade ) {
64- throw new RuntimeException ("Access to " + blkFname + " is denied."
66+ throw new SkippedException ("Access to " + blkFname + " is denied."
6567 + " Run test as root." , ade );
6668
6769 }
You can’t perform that action at this time.
0 commit comments