On Tue, 22 Feb 2022 12:17:59 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. test/jdk/java/lang/ProcessBuilder/Basic.java line 1891: > 1889: Process p = Runtime.getRuntime().exec(cmdp, envp); > 1890: String expected = Windows.is() ? > "=C:=\\,=ExitValue=3,SystemRoot="+systemRoot+"," : "=C:=\\,"; > 1891: expected = AIX.is() ? expected + > "LIBPATH="+removeTestNativepathString(libpath)+",": expected; Can line 1878 (and the fix) be moved into the `removeAixExpectedVars` method. 1883: if (AIX.is()) { 1884: commandOutput = removeAixExpectedVars(commandOutput); 1885: } The `replaceAll` used in that method should be just as effective as the more expensive new method. ------------- PR: https://git.openjdk.java.net/jdk/pull/7574