RFR: 8327095: (ch) java/nio/channels/AsyncCloseAndInterrupt.java: improve error message when mkfifo fails [v3]
Daniel Jeliński
djelinski at openjdk.org
Tue Mar 12 07:39:13 UTC 2024
On Mon, 11 Mar 2024 22:44:25 GMT, Brian Burkhalter <bpb at openjdk.org> wrote:
>> Add to the error message of the `IOException` thrown when the `mkfifo` command fails:
>>
>> 1. the absolute path of the FIFO which was to have been created;
>> 2. the text read from the standard error stream of the process in which `mkfifo` was executed.
>
> Brian Burkhalter has updated the pull request incrementally with one additional commit since the last revision:
>
> 8327095: Improve ProcessTools use
test/jdk/java/nio/channels/AsyncCloseAndInterrupt.java line 144:
> 142: OutputAnalyzer oa = ProcessTools.executeProcess(pb);
> 143: oa.waitFor();
> 144: if (oa.pid() != 0)
The test is currently failing for me on WSL1 (Linux configuration), both with and without your changes; presumably NTFS doesn't support FIFO files. Should we fail or skip the test in this case? I'm fine with either, WSL is not a supported build config, and this is not the only failure.
If you choose to fail the test, then you can use:
ProcessTools.executeProcess(pb).shouldHaveExitValue(0);
this will dump the output and throw a RuntimeException for you.
If you choose to skip the fifo test instead, `oa.getExitValue()` is what you need here.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/18072#discussion_r1520980244
More information about the nio-dev
mailing list