On Wed, 18 Mar 2026 17:12:32 GMT, David Beaumont <[email protected]> wrote:

>> 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.
>
> test/jdk/java/lang/ProcessBuilder/Basic.java line 1:
> 
>> 1: /*
> 
> I think my general comment here is that I'm struggling to even understand 
> what's being tested for here?
> What does a pass tell us compared to failure?

A reliable sleep program is needed across operating systems and configured 
paths.
Windows had been problematic, so a dedicated sleep program is compiled.
It is cleaner to use OS provided executables whenever available on an OS in a 
reliable location.
Having to build local natives makes it harder to run and debug the tests from 
the command line.
Of course, these tests are very old and fragile, but replacing them could 
easily not cover the same cases and add a lot of churn to the tests.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/30150#discussion_r2955913767

Reply via email to