[lworld] RFR: 8375602: [lworld] Test verifiers should verify the equivalence of the objects if possible

Tobias Hartmann thartmann at openjdk.org
Tue Jan 20 11:05:08 UTC 2026


On Mon, 19 Jan 2026 12:08:04 GMT, Quan Anh Mai <qamai at openjdk.org> wrote:

> Hi,
> 
> There are numerous tests of which verifiers assert that the hash value of 2 objects are equal to verify that those objects are equal. As `acmp` has become more mature, this PR updates those to verify that 2 objects are equal. This is more straightforward and it produces a nicer debug message in case of failures. I changed the order of some asserts that are changed or nearby. This is because the argument order of assert is `(expected, actual)`, and the assertion message would be `expected: ..., but was: ...`, so changing the order to the correct one gives us a more intuitive message.
> 
> A side effect of this PR is that it helps reproduce [JDK-8372824](https://bugs.openjdk.org/browse/JDK-8372824) in a consistent manner with `-XX:+UnlockExperimentalVMOptions -XX:PerMethodSpecTrapLimit=0 -XX:PerMethodTrapLimit=0`.
> 
> Please take a look and leave your reviews, thanks a lot.

Nice cleanup, looks good to me! Some tests might need copyright updates.

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

Marked as reviewed by thartmann (Committer).

PR Review: https://git.openjdk.org/valhalla/pull/1929#pullrequestreview-3681624350


More information about the valhalla-dev mailing list