From: Martin Schwenke Date: Wed, 22 Jul 2020 04:42:36 +0000 (+1000) Subject: Revert "ctdb-tests: Improve test quality" X-Git-Tag: talloc-2.3.2~1039 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=979a6c8c5fe3891f8003de60e7d345029f905368;p=thirdparty%2Fsamba.git Revert "ctdb-tests: Improve test quality" Fix missing Reviewed-by: tag. This reverts commit a308f2534d3991866efa2c662921ec63b4238888. Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs --- diff --git a/ctdb/tests/INTEGRATION/simple/cluster.010.getrelock.sh b/ctdb/tests/INTEGRATION/simple/cluster.010.getrelock.sh index 3a766540db8..03cf4317a39 100755 --- a/ctdb/tests/INTEGRATION/simple/cluster.010.getrelock.sh +++ b/ctdb/tests/INTEGRATION/simple/cluster.010.getrelock.sh @@ -11,14 +11,17 @@ set -e ctdb_test_init echo "Check that recovery lock is set the same on all nodes..." -ctdb_onnode all getreclock +try_command_on_node -v -q all $CTDB getreclock -# outfile is set above by ctdb_onnode -# shellcheck disable=SC2154 -n=$(sort -u "$outfile" | wc -l | tr -d '[:space:]') +if [ -z "$out" ] ; then + echo "GOOD: Recovery lock is unset on all nodes" + exit 0 +fi -case "$n" in -0) echo "GOOD: Recovery lock is unset on all nodes" ;; -1) echo "GOOD: All nodes have the same recovery lock setting" ;; -*) ctdb_test_fail "BAD: Recovery lock setting differs across nodes" ;; -esac +n=$(sort -u "$outfile" | wc -l | tr -d '[:space:]') +if [ "$n" = 1 ] ; then + echo "GOOD: All nodes have the same recovery lock setting" +else + echo "BAD: Recovery lock setting differs across nodes" + exit 1 +fi