File tree Expand file tree Collapse file tree 1 file changed +5
-7
lines changed
test/jdk/com/sun/nio/sctp/SctpChannel Expand file tree Collapse file tree 1 file changed +5
-7
lines changed Original file line number Diff line number Diff line change 1
1
/*
2
- * Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved.
2
+ * Copyright (c) 2021, 2025, Oracle and/or its affiliates. All rights reserved.
3
3
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4
4
*
5
5
* This code is free software; you can redistribute it and/or modify it
26
26
* @bug 8238274
27
27
* @summary Potential leak file descriptor for SCTP
28
28
* @requires (os.family == "linux")
29
+ * @library /test/lib
30
+ * @build jtreg.SkippedException
29
31
* @run main/othervm/timeout=250 CloseDescriptors
30
32
*/
31
33
@@ -52,9 +54,7 @@ public class CloseDescriptors {
52
54
53
55
public static void main (String [] args ) throws Exception {
54
56
if (!Util .isSCTPSupported ()) {
55
- System .out .println ("SCTP protocol is not supported" );
56
- System .out .println ("Test cannot be run" );
57
- return ;
57
+ throw new jtreg .SkippedException ("SCTP protocol is not supported" );
58
58
}
59
59
60
60
List <String > lsofDirs = List .of ("/usr/bin" , "/usr/sbin" );
@@ -63,9 +63,7 @@ public static void main(String[] args) throws Exception {
63
63
.filter (f -> Files .isExecutable (f ))
64
64
.findFirst ();
65
65
if (!lsof .isPresent ()) {
66
- System .out .println ("Cannot locate lsof in " + lsofDirs );
67
- System .out .println ("Test cannot be run" );
68
- return ;
66
+ throw new jtreg .SkippedException ("Cannot locate lsof in " + lsofDirs );
69
67
}
70
68
71
69
try (ServerSocket ss = new ServerSocket (0 )) {
You can’t perform that action at this time.
0 commit comments