pthreadpool: Add a test for the race condition fixed in the last commit
[Samba.git] / ctdb / tests / simple / 35_ctdb_getreclock.sh
blob5d24e2dd1453b1aeca6ae9c5a244b5b8edbf0618
1 #!/bin/bash
3 test_info()
5 cat <<EOF
6 Verify that "ctdb getreclock" gets the recovery lock correctly.
8 Make sure the recovery lock is consistent across all nodes.
9 EOF
12 . "${TEST_SCRIPTS_DIR}/integration.bash"
14 ctdb_test_init "$@"
16 set -e
18 cluster_is_healthy
20 echo "Check that recovery lock is set the same on all nodes..."
21 try_command_on_node -v -q all $CTDB getreclock
23 if [ -z "$out" ] ; then
24 echo "GOOD: Recovery lock is unset on all nodes"
25 exit 0
28 n=$(echo "$out" | sort -u | wc -l)
29 if [ "$n" = 1 ] ; then
30 echo "GOOD: All nodes have the same recovery lock setting"
31 else
32 echo "BAD: Recovery lock setting differs across nodes"
33 exit 1