ctdb-tests: Remove function daemons_start_1()
authorMartin Schwenke <martin@meltin.net>
Tue, 23 Aug 2016 01:07:25 +0000 (11:07 +1000)
committerAmitay Isaacs <amitay@samba.org>
Tue, 23 Aug 2016 15:22:17 +0000 (17:22 +0200)
This function doesn't do anything significant, so just unroll the body
into the loop in daemons_start().

BUG: https://bugzilla.samba.org/show_bug.cgi?id=12170

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
ctdb/tests/simple/scripts/local_daemons.bash

index 24c0ee154ccafef4ce2c8c113b092b7a19c11dfe..a53a2f24cbb76f6c7edc388a1b01279c524529b5 100644 (file)
@@ -129,26 +129,20 @@ EOF
     done
 }
 
-daemons_start_1 ()
-{
-    local pnn="$1"
-
-    local pidfile="${TEST_VAR_DIR}/ctdbd.${pnn}.pid"
-    local conf="${TEST_VAR_DIR}/ctdbd.${pnn}.conf"
-
-    # We'll use "pkill -f" to kill the daemons with
-    # "ctdbd --sloppy-start --nopublicipcheck" as context.
-    CTDBD="${VALGRIND} ctdbd --sloppy-start --nopublicipcheck" \
-        CTDBD_CONF="$conf" \
-        ctdbd_wrapper "$pidfile" start
-}
-
 daemons_start ()
 {
     echo "Starting $TEST_LOCAL_DAEMONS ctdb daemons..."
 
-    for i in $(seq 0 $(($TEST_LOCAL_DAEMONS - 1))) ; do
-       daemons_start_1 $i
+    local pnn
+    for pnn in $(seq 0 $(($TEST_LOCAL_DAEMONS - 1))) ; do
+       local pidfile="${TEST_VAR_DIR}/ctdbd.${pnn}.pid"
+       local conf="${TEST_VAR_DIR}/ctdbd.${pnn}.conf"
+
+       # We'll use "pkill -f" to kill the daemons with
+       # "ctdbd --sloppy-start --nopublicipcheck" as context.
+       CTDBD="${VALGRIND} ctdbd --sloppy-start --nopublicipcheck" \
+            CTDBD_CONF="$conf" \
+            ctdbd_wrapper "$pidfile" start
     done
 }