Test java/lang/ProcessBuilder/Basic.java fails with 'Exception: 
java.lang.Error: PATH search algorithm"
The tests in ProcessBuilder.Basic related to PATH search algorithm use the 
system binaries for /bin/true and /bin/false.
The tests proceed to copy the binaries to different directories on carefully 
constructed PATHs and verify the correct one is found.  
On some Linux OS's the binaries for /bin/true and /bin/false are the same 
binary. Distinguished only by arg[0] when executed.
On Ubuntu 25-10, copying the binary to `prog` and launching it, results in the 
exit status not being the expected value.
Musl and Apline systems have other limitations that are already reflected in 
special cases.
A solution proposed here is to provide separate binaries for the true and false 
functions so their invocation is more controlled.

Use native BasicTrue and BasicFalse executables in cases where /bin/true and 
/bin/false are not unique.

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

Commit messages:
 - 8379122: Test java/lang/ProcessBuilder/Basic.java fails with 'Exception: 
java.lang.Error: PATH search algorithm"

Changes: https://git.openjdk.org/jdk/pull/30150/files
  Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=30150&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8379122
  Stats: 124 lines in 3 files changed: 99 ins; 0 del; 25 mod
  Patch: https://git.openjdk.org/jdk/pull/30150.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/30150/head:pull/30150

PR: https://git.openjdk.org/jdk/pull/30150

Reply via email to