From: Martin Schwenke Date: Mon, 8 Aug 2022 08:11:26 +0000 (+1000) Subject: ctdb-tests: Fix typos X-Git-Tag: talloc-2.4.0~1336 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=42aedc62e3a16bcdafbef06140105650f15f6269;p=thirdparty%2Fsamba.git ctdb-tests: Fix typos These lines are just wrong: try_command_on_node -v $test_node "ip addr show to ${test_node}" if -n "$out"; then The 2nd variable referenced should be $test_ip. The 2nd line causes "-n: command not found" because it is missing [] test command brackets. Both typos would probably make the test pass unconditionally. Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs --- diff --git a/ctdb/tests/CLUSTER/complex/11_ctdb_delip_removes_ip.sh b/ctdb/tests/CLUSTER/complex/11_ctdb_delip_removes_ip.sh index 21e6d1e7914..72a498b2dd8 100755 --- a/ctdb/tests/CLUSTER/complex/11_ctdb_delip_removes_ip.sh +++ b/ctdb/tests/CLUSTER/complex/11_ctdb_delip_removes_ip.sh @@ -26,8 +26,8 @@ increment=5 count=0 echo "Waiting for ${test_ip} to disappear from node ${test_node}..." while :; do - try_command_on_node -v $test_node "ip addr show to ${test_node}" - if -n "$out"; then + try_command_on_node -v $test_node "ip addr show to ${test_ip}" + if [ -n "$out" ]; then echo "Still there..." if [ $(($count * $increment)) -ge $timeout ]; then echo "BAD: Timed out waiting..."