RFR: 8282239 [testbug, AIX] ProcessBuilder/Basic.java fails with incorrect LIBPATH

Tyler Steele duke at openjdk.java.net
Tue Feb 22 21:30:24 UTC 2022


This test had two failing sections on AIX related to an incorrect expected value for LIBPATH. The two (previously failing) test sections are below. 

- Test Runtime.exec(...envp...) with envstrings with initial `='
- Test Runtime.exec(...envp...) with envstrings containing NULs

This PR modifies the environment passed to the process at ...exec(cmdp, **envp**) to include the LIBPATH of the parent. With this change, the expected libpath matches the libpath returned by the process.

### Alternatives

An equivalent change would be to modify the libpath variable used to set the expected value for the test without explicitly setting the LIBPATH in process invocation. This would involve removing the libpath for .../jtreg/native that is added by the test runner by command-line option `-J-Dtest.nativepath=...images/test/jdk/jtreg/native `. This change would be reasonable, but I prefer the approach taken in this PR.

### Testing

This test now passes on my test machine running AIX 7.1.

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

Commit messages:
 - Fixes testbug causing failure in ProcessBuilder/Basic on AIX

Changes: https://git.openjdk.java.net/jdk/pull/7581/files
 Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=7581&range=00
  Issue: https://bugs.openjdk.java.net/browse/JDK-8282239
  Stats: 27 lines in 1 file changed: 1 ins; 8 del; 18 mod
  Patch: https://git.openjdk.java.net/jdk/pull/7581.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/7581/head:pull/7581

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


More information about the core-libs-dev mailing list