view tests-custom/src/main/resources/org/openjdk/jcstress/desc/locks.xml @ 152:7a9f5f818d94

Update the copyright year to 2014 for the files modifed in 2014.
author shade
date Wed, 07 May 2014 17:11:41 +0400
parents d7f7a93800e4
children
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>

    <template name="syncBarrier">
        <contributed-by>Aleksey Shipilev (aleksey.shipilev@oracle.com)</contributed-by>
        <description>
            Tests if the synchronized section provides the essential barriers.
        </description>
        <case>
            <match>[0, 0]</match>
            <match>[0, 2]</match>
            <expect>ACCEPTABLE</expect>
            <description>
                The write to $b is not visible yet; we can observe whatever in $a.
            </description>
        </case>
        <case>
            <match>[1, 2]</match>
            <expect>ACCEPTABLE</expect>
            <description>
                The write to $b is observed, expected to see $a == 1.
            </description>
        </case>
        <case>
            <match>[1, 0]</match>
            <expect>ACCEPTABLE_INTERESTING</expect>
            <description>
                The write to $b is observed, but write to $a is not. This is the counter-intuitive behavior,
                but the coding pattern is incorrect: alone "sync" barrier is not enough to get the proper
                acquire/release semantics.
            </description>
        </case>
        <unmatched>
            <expect>FORBIDDEN</expect>
            <description>
                Other cases are not expected.
            </description>
        </unmatched>
    </template>

    <test name="org.openjdk.jcstress.tests.locks.barriers.SyncBarrier0Test" template="syncBarrier" />
    <test name="org.openjdk.jcstress.tests.locks.barriers.SyncBarrier1Test" template="syncBarrier" />
    <test name="org.openjdk.jcstress.tests.locks.barriers.SyncBarrier2Test" template="syncBarrier" />
    <test name="org.openjdk.jcstress.tests.locks.barriers.SyncBarrier3Test" template="syncBarrier" />
    <test name="org.openjdk.jcstress.tests.locks.barriers.SyncBarrier4Test" template="syncBarrier" />

    <test name="org.openjdk.jcstress.tests.locks.mutex.SynchronizedMutexTest">
        <contributed-by>Aleksey Shipilev (aleksey.shipilev@oracle.com)</contributed-by>
        <description>
            Test the mutual exclusion for intrinsic synchronization.
        </description>
        <case>
            <match>[0, 2]</match>
            <expect>ACCEPTABLE</expect>
            <description>
                T2 -> T1 execution
            </description>
        </case>
        <case>
            <match>[1, 0]</match>
            <expect>ACCEPTABLE</expect>
            <description>
                T1 -> T2 execution
            </description>
        </case>
        <unmatched>
            <expect>FORBIDDEN</expect>
            <description>
                Other cases are not expected.
            </description>
        </unmatched>
    </test>

</testsuite>