RFR (M) 8155739: [TESTBUG] VarHandles/Unsafe tests for weakCAS should allow spurious failures
Hi, I would like to fix a simple testbug in our weakCompareAndSet VarHandles and Unsafe intrinsics tests. weakCompareAndSet is spec-ed to allow spurious failures, but current tests do not allow that. This blocks development and testing on non-x86 platforms. Bug: https://bugs.openjdk.java.net/browse/JDK-8155739 Webrevs: http://cr.openjdk.java.net/~shade/8155739/webrev.hs.00/ http://cr.openjdk.java.net/~shade/8155739/webrev.jdk.00/ The tests are auto-generated, and the substantiative changes are in *.template files. I also removed obsolete generate-unsafe-tests.sh. I would like to push through hs-comp to expose this to Power and AArch64 folks early. Testing: x86_64, jdk:java/lang/invoke/VarHandle, hotspot:compiler/unsafe Thanks, -Aleksey
On 29 Apr 2016, at 15:12, Aleksey Shipilev <aleksey.shipilev@oracle.com> wrote:
Hi,
I would like to fix a simple testbug in our weakCompareAndSet VarHandles and Unsafe intrinsics tests. weakCompareAndSet is spec-ed to allow spurious failures, but current tests do not allow that. This blocks development and testing on non-x86 platforms.
Bug: https://bugs.openjdk.java.net/browse/JDK-8155739
Webrevs: http://cr.openjdk.java.net/~shade/8155739/webrev.hs.00/ http://cr.openjdk.java.net/~shade/8155739/webrev.jdk.00/
Looks good. Small tweak if you so wish to do so: #if[JdkInternalMisc] static final int WEAK_ATTEMPTS = Integer.getInteger("weakAttempts", 10); #end[JdkInternalMisc] which avoids changes to the SunMiscUnsafe* tests. Paul.
The tests are auto-generated, and the substantiative changes are in *.template files. I also removed obsolete generate-unsafe-tests.sh. I would like to push through hs-comp to expose this to Power and AArch64 folks early.
Testing: x86_64, jdk:java/lang/invoke/VarHandle, hotspot:compiler/unsafe
Thanks, -Aleksey
On 04/30/2016 02:42 AM, Paul Sandoz wrote:
On 29 Apr 2016, at 15:12, Aleksey Shipilev <aleksey.shipilev@oracle.com> wrote: Looks good.
Small tweak if you so wish to do so:
#if[JdkInternalMisc] static final int WEAK_ATTEMPTS = Integer.getInteger("weakAttempts", 10); #end[JdkInternalMisc]
which avoids changes to the SunMiscUnsafe* tests.
Alas, there are still whitespace changes in SunMiscUnsafe* tests, so changes are unavoidable, and I would like to keep the patch in its current form. Thanks, -Aleksey
On 2 May 2016, at 04:56, Aleksey Shipilev <aleksey.shipilev@oracle.com> wrote:
On 04/30/2016 02:42 AM, Paul Sandoz wrote:
On 29 Apr 2016, at 15:12, Aleksey Shipilev <aleksey.shipilev@oracle.com> wrote: Looks good.
Small tweak if you so wish to do so:
#if[JdkInternalMisc] static final int WEAK_ATTEMPTS = Integer.getInteger("weakAttempts", 10); #end[JdkInternalMisc]
which avoids changes to the SunMiscUnsafe* tests.
Alas, there are still whitespace changes in SunMiscUnsafe* tests, so changes are unavoidable, and I would like to keep the patch in its current form.
No objections from me. Paul.
Hi Aleksey, thanks for this quick fix. The change looks good! Adding to Paul, you could restrict the definition of WEAK_ATTEMPTS even further if you want: #if[CAS] #if[JdkInternalMisc] static final int WEAK_ATTEMPTS = Integer.getInteger("weakAttempts", 10); #end[JdkInternalMisc] #end[CAS] We still have two other test failures with our new intrinsic implementation on ppc64, but that's pretty sure our fault :) Regards, Volker On Sat, Apr 30, 2016 at 1:42 AM, Paul Sandoz <paul.sandoz@oracle.com> wrote:
On 29 Apr 2016, at 15:12, Aleksey Shipilev <aleksey.shipilev@oracle.com> wrote:
Hi,
I would like to fix a simple testbug in our weakCompareAndSet VarHandles and Unsafe intrinsics tests. weakCompareAndSet is spec-ed to allow spurious failures, but current tests do not allow that. This blocks development and testing on non-x86 platforms.
Bug: https://bugs.openjdk.java.net/browse/JDK-8155739
Webrevs: http://cr.openjdk.java.net/~shade/8155739/webrev.hs.00/ http://cr.openjdk.java.net/~shade/8155739/webrev.jdk.00/
Looks good.
Small tweak if you so wish to do so:
#if[JdkInternalMisc] static final int WEAK_ATTEMPTS = Integer.getInteger("weakAttempts", 10); #end[JdkInternalMisc]
which avoids changes to the SunMiscUnsafe* tests.
Paul.
The tests are auto-generated, and the substantiative changes are in *.template files. I also removed obsolete generate-unsafe-tests.sh. I would like to push through hs-comp to expose this to Power and AArch64 folks early.
Testing: x86_64, jdk:java/lang/invoke/VarHandle, hotspot:compiler/unsafe
Thanks, -Aleksey
participants (3)
-
Aleksey Shipilev
-
Paul Sandoz
-
Volker Simonis