]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
ctdb-tests: Fix typos
authorMartin Schwenke <martin@meltin.net>
Mon, 8 Aug 2022 08:11:26 +0000 (18:11 +1000)
committerAmitay Isaacs <amitay@samba.org>
Thu, 25 Aug 2022 15:22:36 +0000 (15:22 +0000)
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 <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
ctdb/tests/CLUSTER/complex/11_ctdb_delip_removes_ip.sh

index 21e6d1e79142ccb1e86a72d20fe7d99b3947b7ba..72a498b2dd8eb42eb48fa47e2b5987cce3fa9657 100755 (executable)
@@ -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..."