ctdb-tests: Avoid shellcheck warning SC2004
authorMartin Schwenke <martin@meltin.net>
Mon, 5 Aug 2019 00:14:22 +0000 (10:14 +1000)
committerAmitay Isaacs <amitay@samba.org>
Wed, 14 Aug 2019 09:11:34 +0000 (09:11 +0000)
SC2004 $/${} is unnecessary on arithmetic variables

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
ctdb/tests/run_tests.sh

index 5d2d3ff560b32a14b636e60fbe3eb7a89cd0fe24..710bea40e8f79a05b2a2799a5783633bb9c55d04 100755 (executable)
@@ -119,7 +119,7 @@ ctdb_test_end ()
        fi
     fi
 
-    testduration=$(($(date +%s)-$teststarttime))
+    testduration=$(($(date +%s) - teststarttime))
 
     echo "=========================================================================="
     echo "TEST ${interp}: ${name}${statstr} (duration: ${testduration}s)"
@@ -185,14 +185,14 @@ run_one_test ()
 {
     local f="$1"
 
-    tests_total=$(($tests_total + 1))
+    tests_total=$((tests_total + 1))
 
     ctdb_test_run "$f" | tee "$tf" | show_progress
     status=$?
     if [ $status -eq 0 ] ; then
-       tests_passed=$(($tests_passed + 1))
+       tests_passed=$((tests_passed + 1))
     else
-       tests_failed=$(($tests_failed + 1))
+       tests_failed=$((tests_failed + 1))
     fi
     if $with_summary ; then
        local t