On Wed, 23 Feb 2022 18:49:22 GMT, Ichiroh Takiguchi <itakigu...@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

My preference is to pass the unmodified LIBPATH in the environment in each of 
the three cases.
The expected checks already expect the unmodified LIBPATH so the only change is 
in the setup of the environment to be passed to the child.

Already covered at line 1366:

Insert at line 1873 in the if/then/else:

            } else if (AIX.is()) {
                envp = new String[] {"=ExitValue=3", "=C:=\", 
"LIBPATH="+libpath};
            } else {

(Or assign it to a local as is done for windows, your preference).

And at line 1921'ish:
```            } else if (AIX.is()) {
                envp = new String[] {"LC_ALL=C\u0000\u0000", // Yuck!
                        "FO\u0000=B\u0000R", "LIBPATH="+libpath};


I looked using `sh -c env` but I think it would be more work to change the way 
the output is compared.
The output of `env` is different and has some other values that get inserted.

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

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

Reply via email to