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 25
25
* @bug 8054029
26
26
* @requires (os.family == "linux")
27
27
* @summary FileChannel.size() should be equal to RandomAccessFile.size() and > 0 for block devs on Linux
28
+ * @library /test/lib
28
29
*/
29
30
30
31
import java .io .RandomAccessFile ;
36
37
37
38
import static java .nio .file .StandardOpenOption .*;
38
39
40
+ import jtreg .SkippedException ;
39
41
40
42
public class BlockDeviceSize {
41
43
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 {
61
63
System .err .println ("File " + blkFname + " not found." +
62
64
" Skipping test" );
63
65
} catch (AccessDeniedException ade ) {
64
- throw new RuntimeException ("Access to " + blkFname + " is denied."
66
+ throw new SkippedException ("Access to " + blkFname + " is denied."
65
67
+ " Run test as root." , ade );
66
68
67
69
}
You can’t perform that action at this time.
0 commit comments