view tests-custom/src/main/resources/org/openjdk/jcstress/desc/atomicity-primitive-plain.xml @ 66:d7f7a93800e4

Rewire the grading levels: introduce ACCEPTABLE_SPEC, remove REQUIRED, renames.
author shade
date Thu, 28 Nov 2013 19:10:32 +0400
parents dd797d922f1c
children 7a9f5f818d94
line wrap: on
line source
<!--

    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>

    <test name="org.openjdk.jcstress.tests.atomicity.primitives.plain.ByteAtomicityTest">
        <contributed-by>Aleksey Shipilev (aleksey.shipilev@oracle.com)</contributed-by>
        <description>
            Tests if primitive bytes experience non-atomic updates.
        </description>
        <case>
            <match>[0]</match>
            <expect>ACCEPTABLE</expect>
            <description>
                Default value for the field. Observers are allowed to see the default value for the field,
                because there is the data race between reader and writer.
            </description>
        </case>
        <case>
            <match>[-1]</match>
            <expect>ACCEPTABLE</expect>
            <description>
                The value set by the actor thread. Observer sees the complete update.
            </description>
        </case>
        <unmatched>
            <expect>FORBIDDEN</expect>
            <description>
                This case is not expected.
            </description>
        </unmatched>
    </test>

    <test name="org.openjdk.jcstress.tests.atomicity.primitives.plain.VolatileByteAtomicityTest">
        <contributed-by>Aleksey Shipilev (aleksey.shipilev@oracle.com)</contributed-by>
        <description>
            Tests if primitive bytes experience non-atomic updates.
        </description>
        <case>
            <match>[0]</match>
            <expect>ACCEPTABLE</expect>
            <description>
                Default value for the field. Observers are allowed to see the default value for the field,
                because there is the data race between reader and writer.
            </description>
        </case>
        <case>
            <match>[-1]</match>
            <expect>ACCEPTABLE</expect>
            <description>
                The value set by the actor thread. Observer sees the complete update.
            </description>
        </case>
        <unmatched>
            <expect>FORBIDDEN</expect>
            <description>
                This case is not expected.
            </description>
        </unmatched>
    </test>

    <test name="org.openjdk.jcstress.tests.atomicity.primitives.plain.CharAtomicityTest">
        <contributed-by>Aleksey Shipilev (aleksey.shipilev@oracle.com)</contributed-by>
        <description>
            Tests if primitive chars experience non-atomic updates.
        </description>
        <case>
            <match>[N]</match>
            <expect>ACCEPTABLE</expect>
            <description>
                Default value for the field. Observers are allowed to see the default value for the field,
                because there is the data race between reader and writer.
            </description>
        </case>
        <case>
            <match>[A]</match>
            <expect>ACCEPTABLE</expect>
            <description>
                The value set by the actor thread. Observer sees the complete update.
            </description>
        </case>
        <unmatched>
            <expect>FORBIDDEN</expect>
            <description>
                This case is not expected.
            </description>
        </unmatched>
    </test>

    <test name="org.openjdk.jcstress.tests.atomicity.primitives.plain.VolatileCharAtomicityTest">
        <contributed-by>Aleksey Shipilev (aleksey.shipilev@oracle.com)</contributed-by>
        <description>
            Tests if primitive chars experience non-atomic updates.
        </description>
        <case>
            <match>[N]</match>
            <expect>ACCEPTABLE</expect>
            <description>
                Default value for the field. Observers are allowed to see the default value for the field,
                because there is the data race between reader and writer.
            </description>
        </case>
        <case>
            <match>[A]</match>
            <expect>ACCEPTABLE</expect>
            <description>
                The value set by the actor thread. Observer sees the complete update.
            </description>
        </case>
        <unmatched>
            <expect>FORBIDDEN</expect>
            <description>
                This case is not expected.
            </description>
        </unmatched>
    </test>

    <test name="org.openjdk.jcstress.tests.atomicity.primitives.plain.DoubleAtomicityTest">
        <contributed-by>Aleksey Shipilev (aleksey.shipilev@oracle.com)</contributed-by>
        <description>
            Tests if primitive doubles experience non-atomic updates.
        </description>
        <case>
            <match>[NaN]</match>
            <expect>ACCEPTABLE</expect>
            <description>
                Default value for the field. Observers are allowed to see the default value for the field,
                because there is the data race between reader and writer.
            </description>
        </case>
        <case>
            <match>[0.0]</match>
            <expect>ACCEPTABLE</expect>
            <description>
                The value set by the actor thread. Observer sees the complete update.
            </description>
        </case>
        <unmatched>
            <expect>ACCEPTABLE_SPEC</expect>
            <description>
                Seeing the torn value. This is specifically allowed by JLS.
                This is not a surprising behavior on some 32-bit systems which do not have full-width 64-bit instructions.
            </description>
            <refs>
                <url>http://docs.oracle.com/javase/specs/jls/se7/html/jls-17.html#jls-17.7</url>
            </refs>
        </unmatched>
    </test>

    <test name="org.openjdk.jcstress.tests.atomicity.primitives.plain.VolatileDoubleAtomicityTest">
        <contributed-by>Aleksey Shipilev (aleksey.shipilev@oracle.com)</contributed-by>
        <description>
            Tests if primitive doubles experience non-atomic updates.
        </description>
        <case>
            <match>[NaN]</match>
            <expect>ACCEPTABLE</expect>
            <description>
                Default value for the field. Observers are allowed to see the default value for the field,
                because there is the data race between reader and writer.
            </description>
        </case>
        <case>
            <match>[0.0]</match>
            <expect>ACCEPTABLE</expect>
            <description>
                The value set by the actor thread. Observer sees the complete update.
            </description>
        </case>
        <unmatched>
            <expect>FORBIDDEN</expect>
            <description>
                This case is not expected.
            </description>
        </unmatched>
    </test>

    <test name="org.openjdk.jcstress.tests.atomicity.primitives.plain.FloatAtomicityTest">
        <contributed-by>Aleksey Shipilev (aleksey.shipilev@oracle.com)</contributed-by>
        <description>
            Tests if primitive floats experience non-atomic updates.
        </description>
        <case>
            <match>[NaN]</match>
            <expect>ACCEPTABLE</expect>
            <description>
                Default value for the field. Observers are allowed to see the default value for the field,
                because there is the data race between reader and writer.
            </description>
        </case>
        <case>
            <match>[0.0]</match>
            <expect>ACCEPTABLE</expect>
            <description>
                The value set by the actor thread. Observer sees the complete update.
            </description>
        </case>
        <unmatched>
            <expect>FORBIDDEN</expect>
            <description>
                This case is not expected.
            </description>
        </unmatched>
    </test>

    <test name="org.openjdk.jcstress.tests.atomicity.primitives.plain.VolatileFloatAtomicityTest">
        <contributed-by>Aleksey Shipilev (aleksey.shipilev@oracle.com)</contributed-by>
        <description>
            Tests if primitive floats experience non-atomic updates.
        </description>
        <case>
            <match>[NaN]</match>
            <expect>ACCEPTABLE</expect>
            <description>
                Default value for the field. Observers are allowed to see the default value for the field,
                because there is the data race between reader and writer.
            </description>
        </case>
        <case>
            <match>[0.0]</match>
            <expect>ACCEPTABLE</expect>
            <description>
                The value set by the actor thread. Observer sees the complete update.
            </description>
        </case>
        <unmatched>
            <expect>FORBIDDEN</expect>
            <description>
                This case is not expected.
            </description>
        </unmatched>
    </test>

    <test name="org.openjdk.jcstress.tests.atomicity.primitives.plain.IntAtomicityTest">
        <contributed-by>Aleksey Shipilev (aleksey.shipilev@oracle.com)</contributed-by>
        <description>
            Tests if primitive ints experience non-atomic updates.
        </description>
        <case>
            <match>[0]</match>
            <expect>ACCEPTABLE</expect>
            <description>
                Default value for the field. Observers are allowed to see the default value for the field,
                because there is the data race between reader and writer.
            </description>
        </case>
        <case>
            <match>[-1]</match>
            <expect>ACCEPTABLE</expect>
            <description>
                The value set by the actor thread. Observer sees the complete update.
            </description>
        </case>
        <unmatched>
            <expect>FORBIDDEN</expect>
            <description>
                This case is not expected.
            </description>
        </unmatched>
    </test>

    <test name="org.openjdk.jcstress.tests.atomicity.primitives.plain.VolatileIntAtomicityTest">
        <contributed-by>Aleksey Shipilev (aleksey.shipilev@oracle.com)</contributed-by>
        <description>
            Tests if primitive ints experience non-atomic updates.
        </description>
        <case>
            <match>[0]</match>
            <expect>ACCEPTABLE</expect>
            <description>
                Default value for the field. Observers are allowed to see the default value for the field,
                because there is the data race between reader and writer.
            </description>
        </case>
        <case>
            <match>[-1]</match>
            <expect>ACCEPTABLE</expect>
            <description>
                The value set by the actor thread. Observer sees the complete update.
            </description>
        </case>
        <unmatched>
            <expect>FORBIDDEN</expect>
            <description>
                This case is not expected.
            </description>
        </unmatched>
    </test>

    <test name="org.openjdk.jcstress.tests.atomicity.primitives.plain.LongAtomicityTest">
        <contributed-by>Aleksey Shipilev (aleksey.shipilev@oracle.com)</contributed-by>
        <description>
            Tests if primitive longs experience non-atomic updates.
        </description>
        <case>
            <match>[0]</match>
            <expect>ACCEPTABLE</expect>
            <description>
                Default value for the field. Observers are allowed to see the default value for the field,
                because there is the data race between reader and writer.
            </description>
        </case>
        <case>
            <match>[-1]</match>
            <expect>ACCEPTABLE</expect>
            <description>
                The value set by the actor thread. Observer sees the complete update.
            </description>
        </case>
        <case>
            <match>[4294967295]</match>
            <match>[-4294967296]</match>
            <expect>ACCEPTABLE_SPEC</expect>
            <description>
                Seeing the torn value. This is specifically allowed by JLS.
                This is not a surprising behavior on some 32-bit systems which do not have full-width 64-bit instructions.
            </description>
            <refs>
                <url>http://docs.oracle.com/javase/specs/jls/se7/html/jls-17.html#jls-17.7</url>
            </refs>
        </case>
        <unmatched>
            <expect>FORBIDDEN</expect>
            <description>
                This case is not expected.
            </description>
        </unmatched>
    </test>

    <test name="org.openjdk.jcstress.tests.atomicity.primitives.plain.VolatileLongAtomicityTest">
        <contributed-by>Aleksey Shipilev (aleksey.shipilev@oracle.com)</contributed-by>
        <description>
            Tests if primitive longs experience non-atomic updates.
        </description>
        <case>
            <match>[0]</match>
            <expect>ACCEPTABLE</expect>
            <description>
                Default value for the field. Observers are allowed to see the default value for the field,
                because there is the data race between reader and writer.
            </description>
        </case>
        <case>
            <match>[-1]</match>
            <expect>ACCEPTABLE</expect>
            <description>
                The value set by the actor thread. Observer sees the complete update.
            </description>
        </case>
        <unmatched>
            <expect>FORBIDDEN</expect>
            <description>
                This case is not expected.
            </description>
        </unmatched>
    </test>

    <test name="org.openjdk.jcstress.tests.atomicity.primitives.plain.ShortAtomicityTest">
        <contributed-by>Aleksey Shipilev (aleksey.shipilev@oracle.com)</contributed-by>
        <description>
            Tests if primitive shorts experience non-atomic updates.
        </description>
        <case>
            <match>[0]</match>
            <expect>ACCEPTABLE</expect>
            <description>
                Default value for the field. Observers are allowed to see the default value for the field,
                because there is the data race between reader and writer.
            </description>
        </case>
        <case>
            <match>[-1]</match>
            <expect>ACCEPTABLE</expect>
            <description>
                The value set by the actor thread. Observer sees the complete update.
            </description>
        </case>
        <unmatched>
            <expect>FORBIDDEN</expect>
            <description>
                This case is not expected.
            </description>
        </unmatched>
    </test>

    <test name="org.openjdk.jcstress.tests.atomicity.primitives.plain.VolatileShortAtomicityTest">
        <contributed-by>Aleksey Shipilev (aleksey.shipilev@oracle.com)</contributed-by>
        <description>
            Tests if primitive shorts experience non-atomic updates.
        </description>
        <case>
            <match>[0]</match>
            <expect>ACCEPTABLE</expect>
            <description>
                Default value for the field. Observers are allowed to see the default value for the field,
                because there is the data race between reader and writer.
            </description>
        </case>
        <case>
            <match>[-1]</match>
            <expect>ACCEPTABLE</expect>
            <description>
                The value set by the actor thread. Observer sees the complete update.
            </description>
        </case>
        <unmatched>
            <expect>FORBIDDEN</expect>
            <description>
                This case is not expected.
            </description>
        </unmatched>
    </test>

</testsuite>