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

Dan Lutker dlutker at openjdk.org
Tue Feb 13 18:18:53 UTC 2024


On Tue, 13 Feb 2024 18:08:03 GMT, Bernd <duke at openjdk.org> wrote:

>> test/lib/jdk/test/lib/Platform.java line 145:
>> 
>>> 143:     }
>>> 144: 
>>> 145:     public static boolean isOSX() {
>> 
>> This seems like a real hack. Is there really no better way to identity how sleep is implemented.
>> I'd probably favor an alternative that accepts multiple values for the expected value.
>
> 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.

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

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


More information about the core-libs-dev mailing list