[ovs-dev] [add ovsdb lock tests 3/3] tests: add ovsdb lock tests

Ben Pfaff blp at ovn.org
Thu Jun 23 19:31:41 UTC 2016


On Mon, Jun 06, 2016 at 01:51:16PM -0700, Andy Zhou wrote:
> Add more ovsdb lock tests.
> 
> Signed-off-by: Andy Zhou <azhou at ovn.org>

This test checks c1-output twice, I suspect that the second check should
be for c2-output:

> +#
> +# Two sessions create two locks. Both sessions should able get their own
> +# lock immediately.
> +OVSDB_CHECK_LOCK_SETUP([lock], [positive])
> +AT_CHECK([ovsdb-client --detach lock unix:socket lock0 >c1-output 2>&1],
> +      [0], [], [])
> +AT_CHECK([ovsdb-client --detach lock unix:socket lock1 >c2-output 2>&1],
> +      [0], [], [])
> +OVS_APP_EXIT_AND_WAIT(["`pwd`"/svr-unixctl])
> +OVS_WAIT_UNTIL([test ! -e server-pid])
> +AT_CHECK([cat c1-output], 0, [{"locked":true}
> +], [])
> +AT_CHECK([cat c1-output], 0, [{"locked":true}
> +], [])
> +AT_CLEANUP

Acked-by: Ben Pfaff <blp at ovn.org>



More information about the dev mailing list