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 11/*
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.
33 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44 *
55 * This code is free software; you can redistribute it and/or modify it
2626 * @bug 8238274
2727 * @summary Potential leak file descriptor for SCTP
2828 * @requires (os.family == "linux")
29+ * @library /test/lib
30+ * @build jtreg.SkippedException
2931 * @run main/othervm/timeout=250 CloseDescriptors
3032 */
3133
@@ -52,9 +54,7 @@ public class CloseDescriptors {
5254
5355 public static void main (String [] args ) throws Exception {
5456 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" );
5858 }
5959
6060 List <String > lsofDirs = List .of ("/usr/bin" , "/usr/sbin" );
@@ -63,9 +63,7 @@ public static void main(String[] args) throws Exception {
6363 .filter (f -> Files .isExecutable (f ))
6464 .findFirst ();
6565 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 );
6967 }
7068
7169 try (ServerSocket ss = new ServerSocket (0 )) {
You can’t perform that action at this time.
0 commit comments