changeset 318:3040c983b52c

tests-custom: In WCAS_WCAS tests, both threads may spuriously fail.
author shade
date Fri, 16 Sep 2016 13:07:47 +0200
parents 162fe8f8a34c
children 8c2a93d25e6a
files tests-custom/src/main/java/org/openjdk/jcstress/tests/atomics/booleans/AtomicBooleanPairwiseTests.java tests-custom/src/main/java/org/openjdk/jcstress/tests/atomics/integer/AtomicIntegerArrayPairwiseTests.java tests-custom/src/main/java/org/openjdk/jcstress/tests/atomics/integer/AtomicIntegerFieldUpdaterPairwiseTests.java tests-custom/src/main/java/org/openjdk/jcstress/tests/atomics/integer/AtomicIntegerPairwiseTests.java tests-custom/src/main/java/org/openjdk/jcstress/tests/atomics/longs/AtomicLongArrayPairwiseTests.java tests-custom/src/main/java/org/openjdk/jcstress/tests/atomics/longs/AtomicLongFieldUpdaterPairwiseTests.java tests-custom/src/main/java/org/openjdk/jcstress/tests/atomics/longs/AtomicLongPairwiseTests.java
diffstat 7 files changed, 7 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/tests-custom/src/main/java/org/openjdk/jcstress/tests/atomics/booleans/AtomicBooleanPairwiseTests.java	Fri Sep 16 13:00:41 2016 +0200
+++ b/tests-custom/src/main/java/org/openjdk/jcstress/tests/atomics/booleans/AtomicBooleanPairwiseTests.java	Fri Sep 16 13:07:47 2016 +0200
@@ -85,6 +85,7 @@
 
     @JCStressTest
     @JCStressMeta(Meta.class)
+    @Outcome(id = "0, 0", expect = Expect.ACCEPTABLE_SPEC, desc = "T1 and T2 both spuriously failed")
     public static class WCAS_WCAS {
         @Actor public void actor1(MyState s, IntResult2 r) { r.r1 = s.weakCompareAndSet(false, true) ? 1 : 0; }
         @Actor public void actor2(MyState s, IntResult2 r) { r.r2 = s.weakCompareAndSet(false, true) ? 1 : 0; }
--- a/tests-custom/src/main/java/org/openjdk/jcstress/tests/atomics/integer/AtomicIntegerArrayPairwiseTests.java	Fri Sep 16 13:00:41 2016 +0200
+++ b/tests-custom/src/main/java/org/openjdk/jcstress/tests/atomics/integer/AtomicIntegerArrayPairwiseTests.java	Fri Sep 16 13:07:47 2016 +0200
@@ -542,6 +542,7 @@
     @JCStressMeta(G.class)
     @Outcome(id = "5, 10", expect = Expect.ACCEPTABLE, desc = "T1 -> T2 execution")
     @Outcome(id = "1, 20", expect = Expect.ACCEPTABLE, desc = "T2 -> T1 execution")
+    @Outcome(id = "1, 10", expect = Expect.ACCEPTABLE_SPEC, desc = "T1 and T2 both spuriously failed")
     public static class WCAS_WCAS {
         @Actor public void actor1(S s, IntResult2 r) { r.r1 = s.a.weakCompareAndSet(s.idx, 0, 5) ? 5 : 1; }
         @Actor public void actor2(S s, IntResult2 r) { r.r2 = s.a.weakCompareAndSet(s.idx, 0, 20) ? 20 : 10; }
--- a/tests-custom/src/main/java/org/openjdk/jcstress/tests/atomics/integer/AtomicIntegerFieldUpdaterPairwiseTests.java	Fri Sep 16 13:00:41 2016 +0200
+++ b/tests-custom/src/main/java/org/openjdk/jcstress/tests/atomics/integer/AtomicIntegerFieldUpdaterPairwiseTests.java	Fri Sep 16 13:07:47 2016 +0200
@@ -540,6 +540,7 @@
     @JCStressMeta(G.class)
     @Outcome(id = "5, 10", expect = Expect.ACCEPTABLE, desc = "T1 -> T2 execution")
     @Outcome(id = "1, 20", expect = Expect.ACCEPTABLE, desc = "T2 -> T1 execution")
+    @Outcome(id = "1, 10", expect = Expect.ACCEPTABLE_SPEC, desc = "T1 and T2 both spuriously failed")
     public static class WCAS_WCAS {
         @Actor public void actor1(S s, IntResult2 r) { r.r1 = s.u.weakCompareAndSet(s, 0, 5) ? 5 : 1; }
         @Actor public void actor2(S s, IntResult2 r) { r.r2 = s.u.weakCompareAndSet(s, 0, 20) ? 20 : 10; }
--- a/tests-custom/src/main/java/org/openjdk/jcstress/tests/atomics/integer/AtomicIntegerPairwiseTests.java	Fri Sep 16 13:00:41 2016 +0200
+++ b/tests-custom/src/main/java/org/openjdk/jcstress/tests/atomics/integer/AtomicIntegerPairwiseTests.java	Fri Sep 16 13:07:47 2016 +0200
@@ -538,6 +538,7 @@
     @JCStressMeta(G.class)
     @Outcome(id = "5, 10", expect = Expect.ACCEPTABLE, desc = "T1 -> T2 execution")
     @Outcome(id = "1, 20", expect = Expect.ACCEPTABLE, desc = "T2 -> T1 execution")
+    @Outcome(id = "1, 10", expect = Expect.ACCEPTABLE_SPEC, desc = "T1 and T2 both spuriously failed")
     public static class WCAS_WCAS {
         @Actor public void actor1(S s, IntResult2 r) { r.r1 = s.weakCompareAndSet(0, 5) ? 5 : 1; }
         @Actor public void actor2(S s, IntResult2 r) { r.r2 = s.weakCompareAndSet(0, 20) ? 20 : 10; }
--- a/tests-custom/src/main/java/org/openjdk/jcstress/tests/atomics/longs/AtomicLongArrayPairwiseTests.java	Fri Sep 16 13:00:41 2016 +0200
+++ b/tests-custom/src/main/java/org/openjdk/jcstress/tests/atomics/longs/AtomicLongArrayPairwiseTests.java	Fri Sep 16 13:07:47 2016 +0200
@@ -542,6 +542,7 @@
     @JCStressMeta(G.class)
     @Outcome(id = "5, 10", expect = Expect.ACCEPTABLE, desc = "T1 -> T2 execution")
     @Outcome(id = "1, 20", expect = Expect.ACCEPTABLE, desc = "T2 -> T1 execution")
+    @Outcome(id = "1, 10", expect = Expect.ACCEPTABLE_SPEC, desc = "T1 and T2 both spuriously failed")
     public static class WCAS_WCAS {
         @Actor public void actor1(S s, LongResult2 r) { r.r1 = s.a.weakCompareAndSet(s.idx, 0, 5) ? 5 : 1; }
         @Actor public void actor2(S s, LongResult2 r) { r.r2 = s.a.weakCompareAndSet(s.idx, 0, 20) ? 20 : 10; }
--- a/tests-custom/src/main/java/org/openjdk/jcstress/tests/atomics/longs/AtomicLongFieldUpdaterPairwiseTests.java	Fri Sep 16 13:00:41 2016 +0200
+++ b/tests-custom/src/main/java/org/openjdk/jcstress/tests/atomics/longs/AtomicLongFieldUpdaterPairwiseTests.java	Fri Sep 16 13:07:47 2016 +0200
@@ -540,6 +540,7 @@
     @JCStressMeta(G.class)
     @Outcome(id = "5, 10", expect = Expect.ACCEPTABLE, desc = "T1 -> T2 execution")
     @Outcome(id = "1, 20", expect = Expect.ACCEPTABLE, desc = "T2 -> T1 execution")
+    @Outcome(id = "1, 10", expect = Expect.ACCEPTABLE_SPEC, desc = "T1 and T2 both spuriously failed")
     public static class WCAS_WCAS {
         @Actor public void actor1(S s, LongResult2 r) { r.r1 = s.u.weakCompareAndSet(s, 0, 5) ? 5 : 1; }
         @Actor public void actor2(S s, LongResult2 r) { r.r2 = s.u.weakCompareAndSet(s, 0, 20) ? 20 : 10; }
--- a/tests-custom/src/main/java/org/openjdk/jcstress/tests/atomics/longs/AtomicLongPairwiseTests.java	Fri Sep 16 13:00:41 2016 +0200
+++ b/tests-custom/src/main/java/org/openjdk/jcstress/tests/atomics/longs/AtomicLongPairwiseTests.java	Fri Sep 16 13:07:47 2016 +0200
@@ -539,6 +539,7 @@
     @JCStressMeta(G.class)
     @Outcome(id = "5, 10", expect = Expect.ACCEPTABLE, desc = "T1 -> T2 execution")
     @Outcome(id = "1, 20", expect = Expect.ACCEPTABLE, desc = "T2 -> T1 execution")
+    @Outcome(id = "1, 10", expect = Expect.ACCEPTABLE_SPEC, desc = "T1 and T2 both spuriously failed")
     public static class WCAS_WCAS {
         @Actor public void actor1(S s, LongResult2 r) { r.r1 = s.weakCompareAndSet(0, 5) ? 5 : 1; }
         @Actor public void actor2(S s, LongResult2 r) { r.r2 = s.weakCompareAndSet(0, 20) ? 20 : 10; }