changeset 189:6f47bc0ff37a

Migrate atomicity.buffers.* tests to annotation API.
author shade
date Wed, 13 Aug 2014 00:37:14 +0400
parents d27aa0b021dd
children de3a9167efde
files tests-custom/src/main/java/org/openjdk/jcstress/tests/atomicity/buffers/ByteBufferAtomicityTests.java tests-custom/src/main/java/org/openjdk/jcstress/tests/atomicity/buffers/ByteBufferViewsAtomicityTests.java tests-custom/src/main/java/org/openjdk/jcstress/tests/atomicity/buffers/CharBufferAtomicityTests.java tests-custom/src/main/java/org/openjdk/jcstress/tests/atomicity/buffers/DirectByteBufferAtomicityTests.java tests-custom/src/main/java/org/openjdk/jcstress/tests/atomicity/buffers/DirectByteBufferViewsAtomicityTests.java tests-custom/src/main/java/org/openjdk/jcstress/tests/atomicity/buffers/DoubleBufferAtomicityTests.java tests-custom/src/main/java/org/openjdk/jcstress/tests/atomicity/buffers/FloatBufferAtomicityTests.java tests-custom/src/main/java/org/openjdk/jcstress/tests/atomicity/buffers/GradeChar.java tests-custom/src/main/java/org/openjdk/jcstress/tests/atomicity/buffers/GradeDouble.java tests-custom/src/main/java/org/openjdk/jcstress/tests/atomicity/buffers/GradeFloat.java tests-custom/src/main/java/org/openjdk/jcstress/tests/atomicity/buffers/GradeInt.java tests-custom/src/main/java/org/openjdk/jcstress/tests/atomicity/buffers/IntBufferAtomicityTests.java tests-custom/src/main/java/org/openjdk/jcstress/tests/atomicity/buffers/LongBufferAtomicityTests.java tests-custom/src/main/java/org/openjdk/jcstress/tests/atomicity/buffers/ShortBufferAtomicityTests.java tests-custom/src/main/resources/org/openjdk/jcstress/desc/atomicity-buffers.xml
diffstat 15 files changed, 212 insertions(+), 180 deletions(-) [+]
line wrap: on
line diff
--- a/tests-custom/src/main/java/org/openjdk/jcstress/tests/atomicity/buffers/ByteBufferAtomicityTests.java	Wed Aug 13 00:25:56 2014 +0400
+++ b/tests-custom/src/main/java/org/openjdk/jcstress/tests/atomicity/buffers/ByteBufferAtomicityTests.java	Wed Aug 13 00:37:14 2014 +0400
@@ -25,6 +25,7 @@
 package org.openjdk.jcstress.tests.atomicity.buffers;
 
 import org.openjdk.jcstress.annotations.Actor;
+import org.openjdk.jcstress.annotations.JCStressMeta;
 import org.openjdk.jcstress.annotations.JCStressTest;
 import org.openjdk.jcstress.annotations.State;
 import org.openjdk.jcstress.infra.results.LongResult1;
@@ -45,36 +46,49 @@
     }
 
     @JCStressTest
+    @JCStressMeta(GradeInt.class)
     public static class IntTest {
         @Actor public void actor1(MyState s)                 { s.b.putInt(0, -1);                                    }
         @Actor public void actor2(MyState s, LongResult1 r)  { r.r1 = s.b.getInt(0);                                 }
     }
 
+    @JCStressTest
+    @JCStressMeta(GradeInt.class)
     public static class ShortTest {
         @Actor public void actor1(MyState s, LongResult1 r)  { s.b.putShort(0, (short) -1);                          }
         @Actor public void actor2(MyState s, LongResult1 r)  { r.r1 = s.b.getShort(0);                               }
     }
 
+    @JCStressTest
+    @JCStressMeta(GradeChar.class)
     public static class CharTest {
         @Actor public void actor1(MyState s, LongResult1 r)  { s.b.putChar(0, 'a');                                  }
         @Actor public void actor2(MyState s, LongResult1 r)  { r.r1 = s.b.getChar(0);                                }
     }
 
+    @JCStressTest
+    @JCStressMeta(GradeInt.class)
     public static class LongTest {
         @Actor public void actor1(MyState s, LongResult1 r)  { s.b.putLong(0, -1L);                                  }
         @Actor public void actor2(MyState s, LongResult1 r)  { r.r1 = s.b.getLong(0);                                }
     }
 
+    @JCStressTest
+    @JCStressMeta(GradeDouble.class)
     public static class DoubleTest {
         @Actor public void actor1(MyState s, LongResult1 r)  { s.b.putDouble(0, -1D);                                }
         @Actor public void actor2(MyState s, LongResult1 r)  { r.r1 = Double.doubleToRawLongBits(s.b.getDouble(0));  }
     }
 
+    @JCStressTest
+    @JCStressMeta(GradeFloat.class)
     public static class FloatTest {
         @Actor public void actor1(MyState s, LongResult1 r)  { s.b.putFloat(0, -1F);                                 }
         @Actor public void actor2(MyState s, LongResult1 r)  { r.r1 = Float.floatToRawIntBits(s.b.getFloat(0));      }
     }
 
+    @JCStressTest
+    @JCStressMeta(GradeInt.class)
     public static class ByteTest {
         @Actor public void actor1(MyState s, LongResult1 r)  { s.b.put(0, (byte) -1);                                }
         @Actor public void actor2(MyState s, LongResult1 r)  { r.r1 = s.b.get();                                     }
--- a/tests-custom/src/main/java/org/openjdk/jcstress/tests/atomicity/buffers/ByteBufferViewsAtomicityTests.java	Wed Aug 13 00:25:56 2014 +0400
+++ b/tests-custom/src/main/java/org/openjdk/jcstress/tests/atomicity/buffers/ByteBufferViewsAtomicityTests.java	Wed Aug 13 00:37:14 2014 +0400
@@ -25,6 +25,7 @@
 package org.openjdk.jcstress.tests.atomicity.buffers;
 
 import org.openjdk.jcstress.annotations.Actor;
+import org.openjdk.jcstress.annotations.JCStressMeta;
 import org.openjdk.jcstress.annotations.JCStressTest;
 import org.openjdk.jcstress.annotations.State;
 import org.openjdk.jcstress.infra.results.LongResult1;
@@ -63,36 +64,42 @@
     }
 
     @JCStressTest
+    @JCStressMeta(GradeInt.class)
     public static class IntViewTest {
         @Actor public void actor1(MyState s)                { s.ib.put(0, -1);                                  }
         @Actor public void actor2(MyState s, LongResult1 r) { r.r1 = s.ib.get(0);                               }
     }
 
     @JCStressTest
+    @JCStressMeta(GradeChar.class)
     public static class CharViewTest {
         @Actor public void actor1(MyState s)                { s.cb.put(0, 'a');                                 }
         @Actor public void actor2(MyState s, LongResult1 r) { r.r1 = s.cb.get(0);                               }
     }
 
     @JCStressTest
+    @JCStressMeta(GradeDouble.class)
     public static class DoubleViewTest {
         @Actor public void actor1(MyState s)                { s.db.put(0, -1D);                                 }
         @Actor public void actor2(MyState s, LongResult1 r) { r.r1 = Double.doubleToRawLongBits(s.db.get(0));   }
     }
 
     @JCStressTest
+    @JCStressMeta(GradeFloat.class)
     public static class FloatViewTest {
         @Actor public void actor1(MyState s)                { s.fb.put(0, -1F);                                 }
         @Actor public void actor2(MyState s, LongResult1 r) { r.r1 = Float.floatToRawIntBits(s.fb.get(0));      }
     }
 
     @JCStressTest
+    @JCStressMeta(GradeInt.class)
     public static class LongViewTest {
         @Actor public void actor1(MyState s)                { s.lb.put(0, -1);                                  }
         @Actor public void actor2(MyState s, LongResult1 r) { r.r1 = s.lb.get(0);                               }
     }
 
     @JCStressTest
+    @JCStressMeta(GradeInt.class)
     public static class ShortViewTest {
         @Actor public void actor1(MyState s)                { s.sb.put(0, (short) -1);                          }
         @Actor public void actor2(MyState s, LongResult1 r) { r.r1 = s.sb.get(0);                               }
--- a/tests-custom/src/main/java/org/openjdk/jcstress/tests/atomicity/buffers/CharBufferAtomicityTests.java	Wed Aug 13 00:25:56 2014 +0400
+++ b/tests-custom/src/main/java/org/openjdk/jcstress/tests/atomicity/buffers/CharBufferAtomicityTests.java	Wed Aug 13 00:37:14 2014 +0400
@@ -25,6 +25,7 @@
 package org.openjdk.jcstress.tests.atomicity.buffers;
 
 import org.openjdk.jcstress.annotations.Actor;
+import org.openjdk.jcstress.annotations.JCStressMeta;
 import org.openjdk.jcstress.annotations.JCStressTest;
 import org.openjdk.jcstress.annotations.State;
 import org.openjdk.jcstress.infra.results.LongResult1;
@@ -43,6 +44,7 @@
     }
 
     @JCStressTest
+    @JCStressMeta(GradeChar.class)
     public static class CharTest {
         @Actor public void actor1(MyState s)                { s.b.put(0, 'a');                                      }
         @Actor public void actor2(MyState s, LongResult1 r) { r.r1 = s.b.get();                                     }
--- a/tests-custom/src/main/java/org/openjdk/jcstress/tests/atomicity/buffers/DirectByteBufferAtomicityTests.java	Wed Aug 13 00:25:56 2014 +0400
+++ b/tests-custom/src/main/java/org/openjdk/jcstress/tests/atomicity/buffers/DirectByteBufferAtomicityTests.java	Wed Aug 13 00:37:14 2014 +0400
@@ -25,6 +25,7 @@
 package org.openjdk.jcstress.tests.atomicity.buffers;
 
 import org.openjdk.jcstress.annotations.Actor;
+import org.openjdk.jcstress.annotations.JCStressMeta;
 import org.openjdk.jcstress.annotations.JCStressTest;
 import org.openjdk.jcstress.annotations.State;
 import org.openjdk.jcstress.infra.results.LongResult1;
@@ -45,36 +46,49 @@
     }
 
     @JCStressTest
+    @JCStressMeta(GradeInt.class)
     public static class IntTest {
         @Actor public void actor1(MyState s)                 { s.b.putInt(0, -1);                                    }
         @Actor public void actor2(MyState s, LongResult1 r)  { r.r1 = s.b.getInt(0);                                 }
     }
 
+    @JCStressTest
+    @JCStressMeta(GradeInt.class)
     public static class ShortTest {
         @Actor public void actor1(MyState s, LongResult1 r)  { s.b.putShort(0, (short) -1);                          }
         @Actor public void actor2(MyState s, LongResult1 r)  { r.r1 = s.b.getShort(0);                               }
     }
 
+    @JCStressTest
+    @JCStressMeta(GradeChar.class)
     public static class CharTest {
         @Actor public void actor1(MyState s, LongResult1 r)  { s.b.putChar(0, 'a');                                  }
         @Actor public void actor2(MyState s, LongResult1 r)  { r.r1 = s.b.getChar(0);                                }
     }
 
+    @JCStressTest
+    @JCStressMeta(GradeInt.class)
     public static class LongTest {
         @Actor public void actor1(MyState s, LongResult1 r)  { s.b.putLong(0, -1L);                                  }
         @Actor public void actor2(MyState s, LongResult1 r)  { r.r1 = s.b.getLong(0);                                }
     }
 
+    @JCStressTest
+    @JCStressMeta(GradeDouble.class)
     public static class DoubleTest {
         @Actor public void actor1(MyState s, LongResult1 r)  { s.b.putDouble(0, -1D);                                }
         @Actor public void actor2(MyState s, LongResult1 r)  { r.r1 = Double.doubleToRawLongBits(s.b.getDouble(0));  }
     }
 
+    @JCStressTest
+    @JCStressMeta(GradeFloat.class)
     public static class FloatTest {
         @Actor public void actor1(MyState s, LongResult1 r)  { s.b.putFloat(0, -1F);                                 }
         @Actor public void actor2(MyState s, LongResult1 r)  { r.r1 = Float.floatToRawIntBits(s.b.getFloat(0));      }
     }
 
+    @JCStressTest
+    @JCStressMeta(GradeInt.class)
     public static class ByteTest {
         @Actor public void actor1(MyState s, LongResult1 r)  { s.b.put(0, (byte) -1);                                }
         @Actor public void actor2(MyState s, LongResult1 r)  { r.r1 = s.b.get();                                     }
--- a/tests-custom/src/main/java/org/openjdk/jcstress/tests/atomicity/buffers/DirectByteBufferViewsAtomicityTests.java	Wed Aug 13 00:25:56 2014 +0400
+++ b/tests-custom/src/main/java/org/openjdk/jcstress/tests/atomicity/buffers/DirectByteBufferViewsAtomicityTests.java	Wed Aug 13 00:37:14 2014 +0400
@@ -25,6 +25,7 @@
 package org.openjdk.jcstress.tests.atomicity.buffers;
 
 import org.openjdk.jcstress.annotations.Actor;
+import org.openjdk.jcstress.annotations.JCStressMeta;
 import org.openjdk.jcstress.annotations.JCStressTest;
 import org.openjdk.jcstress.annotations.State;
 import org.openjdk.jcstress.infra.results.LongResult1;
@@ -63,36 +64,42 @@
     }
 
     @JCStressTest
+    @JCStressMeta(GradeInt.class)
     public static class IntViewTest {
         @Actor public void actor1(MyState s)                { s.ib.put(0, -1);                                  }
         @Actor public void actor2(MyState s, LongResult1 r) { r.r1 = s.ib.get(0);                               }
     }
 
     @JCStressTest
+    @JCStressMeta(GradeChar.class)
     public static class CharViewTest {
         @Actor public void actor1(MyState s)                { s.cb.put(0, 'a');                                 }
         @Actor public void actor2(MyState s, LongResult1 r) { r.r1 = s.cb.get(0);                               }
     }
 
     @JCStressTest
+    @JCStressMeta(GradeDouble.class)
     public static class DoubleViewTest {
         @Actor public void actor1(MyState s)                { s.db.put(0, -1D);                                 }
         @Actor public void actor2(MyState s, LongResult1 r) { r.r1 = Double.doubleToRawLongBits(s.db.get(0));   }
     }
 
     @JCStressTest
+    @JCStressMeta(GradeFloat.class)
     public static class FloatViewTest {
         @Actor public void actor1(MyState s)                { s.fb.put(0, -1F);                                 }
         @Actor public void actor2(MyState s, LongResult1 r) { r.r1 = Float.floatToRawIntBits(s.fb.get(0));      }
     }
 
     @JCStressTest
+    @JCStressMeta(GradeInt.class)
     public static class LongViewTest {
         @Actor public void actor1(MyState s)                { s.lb.put(0, -1);                                  }
         @Actor public void actor2(MyState s, LongResult1 r) { r.r1 = s.lb.get(0);                               }
     }
 
     @JCStressTest
+    @JCStressMeta(GradeInt.class)
     public static class ShortViewTest {
         @Actor public void actor1(MyState s)                { s.sb.put(0, (short) -1);                          }
         @Actor public void actor2(MyState s, LongResult1 r) { r.r1 = s.sb.get(0);                               }
--- a/tests-custom/src/main/java/org/openjdk/jcstress/tests/atomicity/buffers/DoubleBufferAtomicityTests.java	Wed Aug 13 00:25:56 2014 +0400
+++ b/tests-custom/src/main/java/org/openjdk/jcstress/tests/atomicity/buffers/DoubleBufferAtomicityTests.java	Wed Aug 13 00:37:14 2014 +0400
@@ -25,6 +25,7 @@
 package org.openjdk.jcstress.tests.atomicity.buffers;
 
 import org.openjdk.jcstress.annotations.Actor;
+import org.openjdk.jcstress.annotations.JCStressMeta;
 import org.openjdk.jcstress.annotations.JCStressTest;
 import org.openjdk.jcstress.annotations.State;
 import org.openjdk.jcstress.infra.results.LongResult1;
@@ -43,6 +44,7 @@
     }
 
     @JCStressTest
+    @JCStressMeta(GradeDouble.class)
     public static class DoubleTest {
         @Actor public void actor1(MyState s)                { s.b.put(0, -1D);                              }
         @Actor public void actor2(MyState s, LongResult1 r) { r.r1 = Double.doubleToRawLongBits(s.b.get()); }
--- a/tests-custom/src/main/java/org/openjdk/jcstress/tests/atomicity/buffers/FloatBufferAtomicityTests.java	Wed Aug 13 00:25:56 2014 +0400
+++ b/tests-custom/src/main/java/org/openjdk/jcstress/tests/atomicity/buffers/FloatBufferAtomicityTests.java	Wed Aug 13 00:37:14 2014 +0400
@@ -25,6 +25,7 @@
 package org.openjdk.jcstress.tests.atomicity.buffers;
 
 import org.openjdk.jcstress.annotations.Actor;
+import org.openjdk.jcstress.annotations.JCStressMeta;
 import org.openjdk.jcstress.annotations.JCStressTest;
 import org.openjdk.jcstress.annotations.State;
 import org.openjdk.jcstress.infra.results.LongResult1;
@@ -43,6 +44,7 @@
     }
 
     @JCStressTest
+    @JCStressMeta(GradeFloat.class)
     public static class FloatTest {
         @Actor public void actor1(MyState s)                { s.b.put(0, -1F);                                    }
         @Actor public void actor2(MyState s, LongResult1 r) { r.r1 = Float.floatToRawIntBits(s.b.get());          }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests-custom/src/main/java/org/openjdk/jcstress/tests/atomicity/buffers/GradeChar.java	Wed Aug 13 00:37:14 2014 +0400
@@ -0,0 +1,39 @@
+/*
+ * Copyright (c) 2014, 2014, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package org.openjdk.jcstress.tests.atomicity.buffers;
+
+import org.openjdk.jcstress.annotations.Description;
+import org.openjdk.jcstress.annotations.Expect;
+import org.openjdk.jcstress.annotations.Outcome;
+import org.openjdk.jcstress.annotations.Ref;
+
+@Description("Tests if operations on buffers are atomic.")
+@Outcome(id = "[97]", expect = Expect.ACCEPTABLE,       desc = "Seeing the complete update.")
+@Outcome(id = "[0]",  expect = Expect.ACCEPTABLE,       desc = "Seeing the default value, this is valid under race.")
+@Outcome(             expect = Expect.ACCEPTABLE_SPEC,  desc = "All other cases are unexpected, but legal.")
+@Ref("http://cs.oswego.edu/pipermail/concurrency-interest/2012-December/010390.html")
+@Ref("http://mail.openjdk.java.net/pipermail/core-libs-dev/2012-December/013133.html")
+public class GradeChar {
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests-custom/src/main/java/org/openjdk/jcstress/tests/atomicity/buffers/GradeDouble.java	Wed Aug 13 00:37:14 2014 +0400
@@ -0,0 +1,39 @@
+/*
+ * Copyright (c) 2014, 2014, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package org.openjdk.jcstress.tests.atomicity.buffers;
+
+import org.openjdk.jcstress.annotations.Description;
+import org.openjdk.jcstress.annotations.Expect;
+import org.openjdk.jcstress.annotations.Outcome;
+import org.openjdk.jcstress.annotations.Ref;
+
+@Description("Tests if operations on buffers are atomic.")
+@Outcome(id = "[-4616189618054758400]",  expect = Expect.ACCEPTABLE,       desc = "Seeing the complete update.")
+@Outcome(id = "[0]",                     expect = Expect.ACCEPTABLE,       desc = "Seeing the default value, this is valid under race.")
+@Outcome(                                expect = Expect.ACCEPTABLE_SPEC,  desc = "All other cases are unexpected, but legal.")
+@Ref("http://cs.oswego.edu/pipermail/concurrency-interest/2012-December/010390.html")
+@Ref("http://mail.openjdk.java.net/pipermail/core-libs-dev/2012-December/013133.html")
+public class GradeDouble {
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests-custom/src/main/java/org/openjdk/jcstress/tests/atomicity/buffers/GradeFloat.java	Wed Aug 13 00:37:14 2014 +0400
@@ -0,0 +1,39 @@
+/*
+ * Copyright (c) 2014, 2014, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package org.openjdk.jcstress.tests.atomicity.buffers;
+
+import org.openjdk.jcstress.annotations.Description;
+import org.openjdk.jcstress.annotations.Expect;
+import org.openjdk.jcstress.annotations.Outcome;
+import org.openjdk.jcstress.annotations.Ref;
+
+@Description("Tests if operations on buffers are atomic.")
+@Outcome(id = "[-1082130432]",  expect = Expect.ACCEPTABLE,       desc = "Seeing the complete update.")
+@Outcome(id = "[0]",            expect = Expect.ACCEPTABLE,       desc = "Seeing the default value, this is valid under race.")
+@Outcome(                       expect = Expect.ACCEPTABLE_SPEC,  desc = "All other cases are unexpected, but legal.")
+@Ref("http://cs.oswego.edu/pipermail/concurrency-interest/2012-December/010390.html")
+@Ref("http://mail.openjdk.java.net/pipermail/core-libs-dev/2012-December/013133.html")
+public class GradeFloat {
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests-custom/src/main/java/org/openjdk/jcstress/tests/atomicity/buffers/GradeInt.java	Wed Aug 13 00:37:14 2014 +0400
@@ -0,0 +1,39 @@
+/*
+ * Copyright (c) 2014, 2014, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package org.openjdk.jcstress.tests.atomicity.buffers;
+
+import org.openjdk.jcstress.annotations.Description;
+import org.openjdk.jcstress.annotations.Expect;
+import org.openjdk.jcstress.annotations.Outcome;
+import org.openjdk.jcstress.annotations.Ref;
+
+@Description("Tests if operations on buffers are atomic.")
+@Outcome(id = "[-1]", expect = Expect.ACCEPTABLE,       desc = "Seeing the complete update.")
+@Outcome(id = "[0]",  expect = Expect.ACCEPTABLE,       desc = "Seeing the default value, this is valid under race.")
+@Outcome(             expect = Expect.ACCEPTABLE_SPEC,  desc = "All other cases are unexpected, but legal.")
+@Ref("http://cs.oswego.edu/pipermail/concurrency-interest/2012-December/010390.html")
+@Ref("http://mail.openjdk.java.net/pipermail/core-libs-dev/2012-December/013133.html")
+public class GradeInt {
+}
--- a/tests-custom/src/main/java/org/openjdk/jcstress/tests/atomicity/buffers/IntBufferAtomicityTests.java	Wed Aug 13 00:25:56 2014 +0400
+++ b/tests-custom/src/main/java/org/openjdk/jcstress/tests/atomicity/buffers/IntBufferAtomicityTests.java	Wed Aug 13 00:37:14 2014 +0400
@@ -25,6 +25,7 @@
 package org.openjdk.jcstress.tests.atomicity.buffers;
 
 import org.openjdk.jcstress.annotations.Actor;
+import org.openjdk.jcstress.annotations.JCStressMeta;
 import org.openjdk.jcstress.annotations.JCStressTest;
 import org.openjdk.jcstress.annotations.State;
 import org.openjdk.jcstress.infra.results.LongResult1;
@@ -43,6 +44,7 @@
     }
 
     @JCStressTest
+    @JCStressMeta(GradeInt.class)
     public static class IntTest {
         @Actor public void actor1(MyState s)                { s.b.put(0, -1);                                       }
         @Actor public void actor2(MyState s, LongResult1 r) { r.r1 = s.b.get();                                     }
--- a/tests-custom/src/main/java/org/openjdk/jcstress/tests/atomicity/buffers/LongBufferAtomicityTests.java	Wed Aug 13 00:25:56 2014 +0400
+++ b/tests-custom/src/main/java/org/openjdk/jcstress/tests/atomicity/buffers/LongBufferAtomicityTests.java	Wed Aug 13 00:37:14 2014 +0400
@@ -25,6 +25,8 @@
 package org.openjdk.jcstress.tests.atomicity.buffers;
 
 import org.openjdk.jcstress.annotations.Actor;
+import org.openjdk.jcstress.annotations.JCStressMeta;
+import org.openjdk.jcstress.annotations.JCStressTest;
 import org.openjdk.jcstress.annotations.State;
 import org.openjdk.jcstress.infra.results.LongResult1;
 
@@ -41,6 +43,8 @@
         }
     }
 
+    @JCStressTest
+    @JCStressMeta(GradeInt.class)
     public static class LongTest {
         @Actor public void actor1(MyState s)                 { s.b.put(0, -1L);                                   }
         @Actor public void actor2(MyState s, LongResult1 r)  { r.r1 = s.b.get();                                  }
--- a/tests-custom/src/main/java/org/openjdk/jcstress/tests/atomicity/buffers/ShortBufferAtomicityTests.java	Wed Aug 13 00:25:56 2014 +0400
+++ b/tests-custom/src/main/java/org/openjdk/jcstress/tests/atomicity/buffers/ShortBufferAtomicityTests.java	Wed Aug 13 00:37:14 2014 +0400
@@ -25,6 +25,7 @@
 package org.openjdk.jcstress.tests.atomicity.buffers;
 
 import org.openjdk.jcstress.annotations.Actor;
+import org.openjdk.jcstress.annotations.JCStressMeta;
 import org.openjdk.jcstress.annotations.JCStressTest;
 import org.openjdk.jcstress.annotations.State;
 import org.openjdk.jcstress.infra.results.LongResult1;
@@ -43,6 +44,7 @@
     }
 
     @JCStressTest
+    @JCStressMeta(GradeInt.class)
     public static class ShortTest {
         @Actor public void actor1(MyState s)                { s.b.put(0, (short)-1);                              }
         @Actor public void actor2(MyState s, LongResult1 r) { r.r1 = s.b.get();                                   }
--- a/tests-custom/src/main/resources/org/openjdk/jcstress/desc/atomicity-buffers.xml	Wed Aug 13 00:25:56 2014 +0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,180 +0,0 @@
-<!--
-
-    Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
-    DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-
-    This code is free software; you can redistribute it and/or modify it
-    under the terms of the GNU General Public License version 2 only, as
-    published by the Free Software Foundation.  Oracle designates this
-    particular file as subject to the "Classpath" exception as provided
-    by Oracle in the LICENSE file that accompanied this code.
-
-    This code is distributed in the hope that it will be useful, but WITHOUT
-    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-    version 2 for more details (a copy is included in the LICENSE file that
-    accompanied this code).
-
-    You should have received a copy of the GNU General Public License version
-    2 along with this work; if not, write to the Free Software Foundation,
-    Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-
-    Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-    or visit www.oracle.com if you need additional information or have any
-    questions.
-
--->
-<testsuite>
-
-    <template name="main">
-        <contributed-by>Aleksey Shipilev (aleksey.shipilev@oracle.com)</contributed-by>
-        <description>Tests if operations on buffers are atomic.</description>
-        <case>
-            <match>[-1]</match>
-            <expect>ACCEPTABLE</expect>
-            <description>Seeing the complete update.</description>
-        </case>
-        <case>
-            <match>[0]</match>
-            <expect>ACCEPTABLE</expect>
-            <description>Seeing the default value, this is valid under race.</description>
-        </case>
-        <unmatched>
-            <expect>ACCEPTABLE_SPEC</expect>
-            <description>All other cases are unexpected, but legal.</description>
-            <refs>
-                <url>http://cs.oswego.edu/pipermail/concurrency-interest/2012-December/010390.html</url>
-                <url>http://mail.openjdk.java.net/pipermail/core-libs-dev/2012-December/013133.html</url>
-            </refs>
-        </unmatched>
-    </template>
-
-    <template name="main-char">
-        <contributed-by>Aleksey Shipilev (aleksey.shipilev@oracle.com)</contributed-by>
-        <description>Tests if operations on buffers are atomic.</description>
-        <case>
-            <match>[97]</match>
-            <expect>ACCEPTABLE</expect>
-            <description>Seeing the complete update.</description>
-        </case>
-        <case>
-            <match>[0]</match>
-            <expect>ACCEPTABLE</expect>
-            <description>Seeing the default value, this is valid under race.</description>
-        </case>
-        <unmatched>
-            <expect>ACCEPTABLE_SPEC</expect>
-            <description>All other cases are unexpected, but legal.</description>
-            <refs>
-                <url>http://cs.oswego.edu/pipermail/concurrency-interest/2012-December/010390.html</url>
-                <url>http://mail.openjdk.java.net/pipermail/core-libs-dev/2012-December/013133.html</url>
-            </refs>
-        </unmatched>
-    </template>
-
-    <template name="main-float">
-        <contributed-by>Aleksey Shipilev (aleksey.shipilev@oracle.com)</contributed-by>
-        <description>Tests if operations on buffers are atomic.</description>
-        <case>
-            <match>[-1082130432]</match>
-            <expect>ACCEPTABLE</expect>
-            <description>Seeing the complete update.</description>
-        </case>
-        <case>
-            <match>[0]</match>
-            <expect>ACCEPTABLE</expect>
-            <description>Seeing the default value, this is valid under race.</description>
-        </case>
-        <unmatched>
-            <expect>ACCEPTABLE_SPEC</expect>
-            <description>All other cases are unexpected, but legal.</description>
-            <refs>
-                <url>http://cs.oswego.edu/pipermail/concurrency-interest/2012-December/010390.html</url>
-                <url>http://mail.openjdk.java.net/pipermail/core-libs-dev/2012-December/013133.html</url>
-            </refs>
-        </unmatched>
-    </template>
-
-    <template name="main-double">
-        <contributed-by>Aleksey Shipilev (aleksey.shipilev@oracle.com)</contributed-by>
-        <description>Tests if operations on buffers are atomic.</description>
-        <case>
-            <match>[-4616189618054758400]</match>
-            <expect>ACCEPTABLE</expect>
-            <description>Seeing the complete update.</description>
-        </case>
-        <case>
-            <match>[0]</match>
-            <expect>ACCEPTABLE</expect>
-            <description>Seeing the default value, this is valid under race.</description>
-        </case>
-        <unmatched>
-            <expect>ACCEPTABLE_SPEC</expect>
-            <description>All other cases are unexpected, but legal.</description>
-            <refs>
-                <url>http://cs.oswego.edu/pipermail/concurrency-interest/2012-December/010390.html</url>
-                <url>http://mail.openjdk.java.net/pipermail/core-libs-dev/2012-December/013133.html</url>
-            </refs>
-        </unmatched>
-    </template>
-
-    <test template="main"
-          name="org.openjdk.jcstress.tests.atomicity.buffers.ByteBufferAtomicityTests$ByteTest"/>
-    <test template="main"
-          name="org.openjdk.jcstress.tests.atomicity.buffers.ByteBufferAtomicityTests$FloatTest"/>
-    <test template="main"
-          name="org.openjdk.jcstress.tests.atomicity.buffers.ByteBufferAtomicityTests$IntTest"/>
-    <test template="main"
-          name="org.openjdk.jcstress.tests.atomicity.buffers.ByteBufferAtomicityTests$LongTest"/>
-    <test template="main"
-          name="org.openjdk.jcstress.tests.atomicity.buffers.ByteBufferAtomicityTests$ShortTest"/>
-
-    <test template="main"
-          name="org.openjdk.jcstress.tests.atomicity.buffers.DirectByteBufferAtomicityTests$ByteTest"/>
-    <test template="main"
-          name="org.openjdk.jcstress.tests.atomicity.buffers.DirectByteBufferAtomicityTests$FloatTest"/>
-    <test template="main"
-          name="org.openjdk.jcstress.tests.atomicity.buffers.DirectByteBufferAtomicityTests$IntTest"/>
-    <test template="main"
-          name="org.openjdk.jcstress.tests.atomicity.buffers.DirectByteBufferAtomicityTests$LongTest"/>
-    <test template="main"
-          name="org.openjdk.jcstress.tests.atomicity.buffers.DirectByteBufferAtomicityTests$ShortTest"/>
-
-    <test template="main"
-          name="org.openjdk.jcstress.tests.atomicity.buffers.FloatBufferAtomicityTests$FloatTest"/>
-    <test template="main"
-          name="org.openjdk.jcstress.tests.atomicity.buffers.IntBufferAtomicityTests$IntTest"/>
-    <test template="main"
-          name="org.openjdk.jcstress.tests.atomicity.buffers.LongBufferAtomicityTests$LongTest"/>
-    <test template="main"
-          name="org.openjdk.jcstress.tests.atomicity.buffers.ShortBufferAtomicityTests$ShortTest"/>
-
-    <test template="main"
-          name="org.openjdk.jcstress.tests.atomicity.buffers.ByteBufferViewsAtomicityTests$IntViewTest"/>
-    <test template="main"
-          name="org.openjdk.jcstress.tests.atomicity.buffers.ByteBufferViewsAtomicityTests$LongViewTest"/>
-    <test template="main"
-          name="org.openjdk.jcstress.tests.atomicity.buffers.ByteBufferViewsAtomicityTests$ShortViewTest"/>
-
-    <test template="main"
-          name="org.openjdk.jcstress.tests.atomicity.buffers.DirectByteBufferViewsAtomicityTests$IntViewTest"/>
-    <test template="main"
-          name="org.openjdk.jcstress.tests.atomicity.buffers.DirectByteBufferViewsAtomicityTests$LongViewTest"/>
-    <test template="main"
-          name="org.openjdk.jcstress.tests.atomicity.buffers.DirectByteBufferViewsAtomicityTests$ShortViewTest"/>
-
-    <test template="main-char" name="org.openjdk.jcstress.tests.atomicity.buffers.ByteBufferAtomicityTests$CharTest" />
-    <test template="main-char" name="org.openjdk.jcstress.tests.atomicity.buffers.ByteBufferViewsAtomicityTests$CharViewTest" />
-    <test template="main-char" name="org.openjdk.jcstress.tests.atomicity.buffers.DirectByteBufferViewsAtomicityTests$CharViewTest" />
-    <test template="main-char" name="org.openjdk.jcstress.tests.atomicity.buffers.CharBufferAtomicityTests$CharTest" />
-    <test template="main-char" name="org.openjdk.jcstress.tests.atomicity.buffers.DirectByteBufferAtomicityTests$CharTest" />
-
-    <test template="main-double" name="org.openjdk.jcstress.tests.atomicity.buffers.ByteBufferAtomicityTests$DoubleTest" />
-    <test template="main-double" name="org.openjdk.jcstress.tests.atomicity.buffers.ByteBufferViewsAtomicityTests$DoubleViewTest" />
-    <test template="main-double" name="org.openjdk.jcstress.tests.atomicity.buffers.DirectByteBufferViewsAtomicityTests$DoubleViewTest" />
-    <test template="main-double" name="org.openjdk.jcstress.tests.atomicity.buffers.DirectByteBufferAtomicityTests$DoubleTest" />
-    <test template="main-double" name="org.openjdk.jcstress.tests.atomicity.buffers.DoubleBufferAtomicityTests$DoubleTest" />
-
-    <test template="main-float" name="org.openjdk.jcstress.tests.atomicity.buffers.ByteBufferViewsAtomicityTests$FloatViewTest" />
-    <test template="main-float" name="org.openjdk.jcstress.tests.atomicity.buffers.DirectByteBufferViewsAtomicityTests$FloatViewTest" />
-</testsuite>