RFR: 8325576: java/lang/ProcessHandle/InfoTest.java fails on systems with coreutils with --enable-single-binary [v2]

Aleksey Shipilev shade at openjdk.org
Tue Feb 13 18:22:53 UTC 2024


On Tue, 13 Feb 2024 18:15:59 GMT, Dan Lutker <dlutker at openjdk.org> wrote:

>> Just ignore the binary name and only check for argv1 is imho enough.
>
> I couldn't think if a better way to detect what the host system had and adding this seemed inline with the busybox check. 
> 
> The choice of running `sleep` seems like it was arbitrary and the test should use something that is under JDK control rather than a platform specific tool that can change from distro to distro. Is there any reason we don't use the `java`, something else in the image, or even something built as part of the test-image.

To be fair, this looks similar to what `isMusl()` does: searching for strings in outputs. But I do wonder if `--help` would include "sleep" for some innocuous description somewhere, and this code would accidentally match. @lutkerd, what's the output for `coreutils --help` for a single executable binary?

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

PR Review Comment: https://git.openjdk.org/jdk/pull/17798#discussion_r1488374538


More information about the core-libs-dev mailing list