On Tue, 13 Feb 2024 18:08:03 GMT, Bernd <d...@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