RFR: 8320750: Allow a testcase to run with multiple -Xlog [v2]
Leo Korinth
lkorinth at openjdk.org
Wed Feb 7 20:37:15 UTC 2024
> Running a testcase with muliple -Xlog crashes JTREG test cases. This is because `Collector.toMap` is not given a merge strategy.
>
> When the same argument is passed multiple times, I have added a merge strategy to use the latter value. This is similar to how it is implemented for `vm.opt.*` in JTREG.
>
> If the flag tested is `-Xlog`, replace the value part with a dummy value "NONEMPTY_TEST_SENTINEL". This is because in the case of multiple `-Xlog` all values are used, and JTREG does not give a satisfactory way to represent them. This dummy value should make it hard to try to `@require` on specific values by mistake.
>
> Tested with:
>
> @requires vm.opt.x.Xlog == "NONEMPTY_TEST_SENTINEL"
> @requires vm.opt.x.Xlog == "NONEMPTY_TEST_SENTINELXXX"
> @requires vm.opt.x.Xms == "3g"
>
> and
>
> JAVA_OPTIONS=-Xms3g -Xms4g
> JAVA_OPTIONS=-Xms4g -Xms3g
> JAVA_OPTIONS=-Xlog:gc* -Xlog:gc*
> ```
>
> Running tier1
Leo Korinth has updated the pull request incrementally with one additional commit since the last revision:
Added test, reworked code structure after suggestions from Stefan and Johan
-------------
Changes:
- all: https://git.openjdk.org/jdk/pull/16824/files
- new: https://git.openjdk.org/jdk/pull/16824/files/a31b90a2..d129a0fb
Webrevs:
- full: https://webrevs.openjdk.org/?repo=jdk&pr=16824&range=01
- incr: https://webrevs.openjdk.org/?repo=jdk&pr=16824&range=00-01
Stats: 122 lines in 2 files changed: 107 ins; 5 del; 10 mod
Patch: https://git.openjdk.org/jdk/pull/16824.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/16824/head:pull/16824
PR: https://git.openjdk.org/jdk/pull/16824
More information about the hotspot-dev
mailing list