RFR: 7903884: jtreg -nativepath should support relative path
Jaikiran Pai
jpai at openjdk.org
Sun Aug 24 10:23:12 UTC 2025
Can I please get a review of this change which addresses https://bugs.openjdk.org/browse/CODETOOLS-7903884?
jtreg supports the `-nativepath` option. When set, this represents the directory in which native libraries can be located by a test. In one part of the code, jtreg uses this value to configure the operating system specific library path environment variables (for example `DYLD_LIBRARY_PATH` environment variable on macos). The issue here is that when setting this value, the path that was provided to `-nativepath` isn't converted to an absolute path. That causes native library lookup failures when a test requiring those native libraries is run.
The commit in this PR addresses the issue by making sure that the path is converted to an absolute path when setting it on the `RegressionParameters`. This then allows the rest of the jtreg code to consistently use an absolute path for that option.
A new self test has been introduced to verify this behaviour. This and the existing self tests continue to pass with this change.
-------------
Commit messages:
- 7903884: jtreg -nativepath should support relative path
Changes: https://git.openjdk.org/jtreg/pull/278/files
Webrev: https://webrevs.openjdk.org/?repo=jtreg&pr=278&range=00
Issue: https://bugs.openjdk.org/browse/CODETOOLS-7903884
Stats: 27 lines in 2 files changed: 23 ins; 0 del; 4 mod
Patch: https://git.openjdk.org/jtreg/pull/278.diff
Fetch: git fetch https://git.openjdk.org/jtreg.git pull/278/head:pull/278
PR: https://git.openjdk.org/jtreg/pull/278
More information about the jtreg-dev
mailing list