RFR: 8282219: jdk/java/lang/ProcessBuilder/Basic.java fails on AIX
Roger Riggs
rriggs at openjdk.java.net
Tue Feb 22 15:18:52 UTC 2022
On Tue, 22 Feb 2022 12:17:59 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.
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
More information about the core-libs-dev
mailing list