RFR: 8282219: jdk/java/lang/ProcessBuilder/Basic.java fails on AIX [v4]

Roger Riggs rriggs at openjdk.java.net
Thu Feb 24 18:54:12 UTC 2022


On Wed, 23 Feb 2022 18:49:22 GMT, Ichiroh Takiguchi <itakiguchi at openjdk.org> wrote:

>> Run jtreg:jdk/java/lang/ProcessBuilder/Basic.java on AIX.
>> The test was failed by:
>>   Incorrect handling of envstrings containing NULs
>> 
>> According to my investigation, this issue was happened after following change was applied.
>> JDK-8272600: (test) Use native "sleep" in Basic.java
>> 
>> test.nativepath value was added into AIX's LIBPATH during running this testcase.
>> On AIX, test.nativepath value should be removed from LIBPATH value before comparing the values.
>
> Ichiroh Takiguchi has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Add null check

The piece I was missing is that the HotSpot AIX specific code, computes and sets LIBPATH based on
the path to the java executable.  This computed LIBPATH value is set in the environment unless
it is overridden by an existing LIBPATH in the environment.

The test cases that failed, do not supply a value for LIBPATH so the launcher provided value is inserted
and thereafter reported as the environment from the child process.

Since both of these tests are testing a different condition not related to LIBPATH, 
the presence/accuracy of LIBPATH is not the point of the test.

The current solution to remove `test.nativepath` works and is ok by me.

(The alternative used by #7581, to include LIBPATH in the environment when launching might be slightly more robust to future changes.)

Thanks for the followup.

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

PR: https://git.openjdk.java.net/jdk/pull/7574


More information about the core-libs-dev mailing list