RFR: 8378702: jdk.test.lib.Platform.isMusl() may return false negative on Alpine Linux

David Holmes dholmes at openjdk.org
Thu Feb 26 06:36:43 UTC 2026


On Wed, 25 Feb 2026 16:47:03 GMT, Frederic Thevenet <fthevenet at openjdk.org> wrote:

> jdk.test.lib.Platform.isMusl() may return false on Alpine linux, where it should return true.
> This means that the jtreg tests is is used to guard will incorrectly fail.
> This happens when tests deliberately clobber the  PATH and `ldd` can no longer be found. This PR uses a full path for `ldd` instead to work around the issue.

test/lib/jdk/test/lib/Platform.java line 196:

> 194:             ProcessBuilder pb = new ProcessBuilder(lddPath.get(), "--version");
> 195:             pb.redirectErrorStream(true);
> 196:             try (Process p = pb.start()) {

`Process` is not `AutoCloseable` - why are you using try-with-resources?

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

PR Review Comment: https://git.openjdk.org/jdk/pull/29923#discussion_r2857188022


More information about the core-libs-dev mailing list