RFR: 8292443: Weak CAS VarHandle/Unsafe tests should test always-failing cases

Aleksey Shipilev shade at openjdk.org
Mon Jan 9 07:06:00 UTC 2023


On Sun, 8 Jan 2023 23:25:36 GMT, David Holmes <dholmes at openjdk.org> wrote:

> Committing unchanged files, other than a copyright year change, looks very odd here. Why was the SunMisUnsafe template updated but none of the tests actually changed?

`X-UnsafeAccessTest.java.template` generates both `SunMisc*` and `JdkInternalMisc*` files, using `JdkInternalMisc` condition to disambiguate the two. So, if we need to change `JdkInternalMisc*`, like this PR does, we need to change `X-UnsafeAccessTest.java.template`, which regenerates `SunMisc*` too. Since `SunMisc*` tests do not have `weakCAS` operations, only the copyright updates hit them. 

You could, in principle, selectively commit only the "substantially affected" files, but I believe the rule for auto-generated files after template updates is to commit everything that was changed after the template change. This guarantees that regenerating files from the unchanged template yields no changes.

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

PR: https://git.openjdk.org/jdk/pull/9892


More information about the hotspot-compiler-dev mailing list