RFR: 8323529: Relativize test image dependencies in microbenchmarks
Claes Redestad
redestad at openjdk.org
Wed Jan 10 15:21:33 UTC 2024
JMH microbenchmarks may have dependencies on artifacts in the test image outside of the benchmarks.jar. This includes native libraries (built into `$TEST_IMAGE/micro/native`) and may soon include other test libraries like wb.jar (built into `$TEST_IMAGE/lib-test/`)
By moving execution to the test image root (currently we run out of the `make` directory) we can make do with relative paths, which means benchmark can supply a build-time constant flag themselves rather than have the test runner provide it for you. And needing to be explicit about external dependencies is good, I think.
Taken together this makes the benchmarks.jar more self-contained and simpler to run: all you need is to run `java -jar micro/benchmarks.jar` from the test image root.
This patch also drive-by fixes some lang.foreign tests that were printing warnings due to a missing `--enable-native-access=ALL-UNNAMED` flag.
-------------
Commit messages:
- 8323529: Relativize test image dependencies in microbenchmarks
Changes: https://git.openjdk.org/jdk/pull/17349/files
Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=17349&range=00
Issue: https://bugs.openjdk.org/browse/JDK-8323529
Stats: 21 lines in 17 files changed: 5 ins; 0 del; 16 mod
Patch: https://git.openjdk.org/jdk/pull/17349.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/17349/head:pull/17349
PR: https://git.openjdk.org/jdk/pull/17349
More information about the core-libs-dev
mailing list