]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
remove sleep from the fetch test
authorRonnie Sahlberg <sahlberg@ronnie>
Wed, 2 May 2007 03:14:12 +0000 (13:14 +1000)
committerRonnie Sahlberg <sahlberg@ronnie>
Wed, 2 May 2007 03:14:12 +0000 (13:14 +1000)
add a test script to start 4 daemons to test recovery

(This used to be ctdb commit 09eab12b00934afa5159fc500faf6b07effb2804)

ctdb/direct/4nodes.txt [new file with mode: 0644]
ctdb/tests/ctdb_fetch.c
ctdb/tests/recover.sh [new file with mode: 0755]

diff --git a/ctdb/direct/4nodes.txt b/ctdb/direct/4nodes.txt
new file mode 100644 (file)
index 0000000..880fe91
--- /dev/null
@@ -0,0 +1,4 @@
+127.0.0.1:9001
+127.0.0.2:9001
+127.0.0.3:9001
+127.0.0.4:9001
index 20dbc2b3c5b8605047d365bb470b90e5b00fcce4..abf360d5319bccbb8218af58b6c6b3024d67b6ed 100644 (file)
@@ -243,7 +243,6 @@ int main(int argc, const char *argv[])
 
        printf("DATA:\n%s\n", (char *)call.reply_data.dptr);
 
-sleep(999999);
        /* go into a wait loop to allow other nodes to complete */
        ctdb_shutdown(ctdb);
 
diff --git a/ctdb/tests/recover.sh b/ctdb/tests/recover.sh
new file mode 100755 (executable)
index 0000000..33afcf8
--- /dev/null
@@ -0,0 +1,37 @@
+#!/bin/sh
+
+killall -q ctdbd
+
+echo "Starting 4 ctdb daemons"
+bin/ctdbd --nlist direct/4nodes.txt
+bin/ctdbd --nlist direct/4nodes.txt
+bin/ctdbd --nlist direct/4nodes.txt
+bin/ctdbd --nlist direct/4nodes.txt
+
+echo "Testing ping"
+bin/ctdb_control ping || exit 1
+
+echo "Testing status"
+bin/ctdb_control status all || exit 1
+
+echo "Testing statusreset"
+bin/ctdb_control statusreset all || exit 1
+
+echo "Testing debug"
+bin/ctdb_control debug all 5 || exit 1
+bin/ctdb_control debuglevel || exit 1
+bin/ctdb_control debug all 0 || exit 1
+bin/ctdb_control debuglevel || exit 1
+
+echo "Testing map calls"
+bin/ctdb_control getvnnmap 0 || exit 1
+
+echo "Attaching to some databases"
+bin/ctdb_control attach test1.tdb || exit 1
+bin/ctdb_control attach test2.tdb || exit 1
+
+echo "Testing getdbmap"
+bin/ctdb_control getdbmap 0 || exit 1
+
+#leave the ctdb daemons running
+#killall -q ctdbd