[lworld] RFR: 8374025: [lworld] valhalla/valuetypes/SubstitutabilityTest.java fails due to argument clashes [v2]
Paul Hübner
phubner at openjdk.org
Thu Jan 29 16:35:25 UTC 2026
> Hi all,
>
> Currently, the non-CDS test of `valhalla/valuetypes/SubstitutabilityTest.java` is disabled. This is because it uses `-Xshare:off` which is fundamentally incompatible with some AOT flags that the test is run with.
>
> In this fix, we introduce a new `@requires` property which denotes if the AOT code cache has been given as a command-line argument. If that is the case, we skip the test. For context, from the failure:
>> Option AOTCache cannot be used at the same time with -Xshare:on, -Xshare:auto, -Xshare:off, -Xshare:dump, DumpLoadedClassList, SharedClassListFile, or SharedArchiveFile
>
> An alternative considered was to use `@requires vm.flagless`. However, there are many configurations, such as different GCs, that we would lose out on. Substitutability plays quite a central concept with value classes, therefore, a new property is perhaps the more suitable approach.
>
> Testing: the Oracle tiers in which we observed failures, and a smoke-test tier 1 on Linux (x64, AArch64), macOS (x64, AArch64), Windows (x64).
Paul Hübner has updated the pull request incrementally with two additional commits since the last revision:
- Merge and don't share.
- Revert "Restrain SubstitutabilityTest with -Xshare:off."
This reverts commit 0fc69eb72574f32b802fdf0a06ecc46fb0fcf3e2.
-------------
Changes:
- all: https://git.openjdk.org/valhalla/pull/1995/files
- new: https://git.openjdk.org/valhalla/pull/1995/files/0fc69eb7..ab8ab1be
Webrevs:
- full: https://webrevs.openjdk.org/?repo=valhalla&pr=1995&range=01
- incr: https://webrevs.openjdk.org/?repo=valhalla&pr=1995&range=00-01
Stats: 28 lines in 4 files changed: 1 ins; 23 del; 4 mod
Patch: https://git.openjdk.org/valhalla/pull/1995.diff
Fetch: git fetch https://git.openjdk.org/valhalla.git pull/1995/head:pull/1995
PR: https://git.openjdk.org/valhalla/pull/1995
More information about the valhalla-dev
mailing list