RFR: 8359402: TesCloseDescriptors.java should throw SkippedException when there is no lsof/sctp

Volkan Yazici vyazici at openjdk.org
Fri Jun 13 06:57:29 UTC 2025


On Fri, 13 Jun 2025 06:36:19 GMT, SendaoYan <syan at openjdk.org> wrote:

> Hi all,
> 
> Test com/sun/nio/sctp/SctpChannel/CloseDescriptors.java should throw jtreg.SkippedException when there is no lsof command or there is no SCTP in test machine.
> Before this PR, this test report Execution successful when there is no SCTP.
> 
> 
> --------------------------------------------------
> TEST: com/sun/nio/sctp/SctpChannel/CloseDescriptors.java
> TEST RESULT: Passed. Execution successful
> --------------------------------------------------
> 
> 
> After this PR, it will report `jtreg.SkippedException` when there is no SCTP
> 
> 
> --------------------------------------------------
> TEST: com/sun/nio/sctp/SctpChannel/CloseDescriptors.java
> TEST RESULT: Passed. Skipped: jtreg.SkippedException: SCTP protocol is not supported
> --------------------------------------------------
> 
> 
> Change has been verified locally, test-fix only, no risk.

Marked as reviewed by vyazici (Committer).

test/jdk/com/sun/nio/sctp/SctpChannel/CloseDescriptors.java line 30:

> 28:  * @requires (os.family == "linux")
> 29:  * @library /test/lib
> 30:  * @build jtreg.SkippedException

I've totally missed that `jtreg.SkippedException` should indeed be added to `@build`. Now I can land a PR touching thousands of test files using `SE`. 😈 (No, I won't. 😅)

-------------

PR Review: https://git.openjdk.org/jdk/pull/25790#pullrequestreview-2923605868
PR Review Comment: https://git.openjdk.org/jdk/pull/25790#discussion_r2144328418


More information about the net-dev mailing list