From: Ronnie Sahlberg Date: Wed, 2 May 2007 03:14:12 +0000 (+1000) Subject: remove sleep from the fetch test X-Git-Tag: tevent-0.9.20~348^2~2794^2~5 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=c06c1e1f9fe394a6ce09267e77d1bc0913dec751;p=thirdparty%2Fsamba.git remove sleep from the fetch test add a test script to start 4 daemons to test recovery (This used to be ctdb commit 09eab12b00934afa5159fc500faf6b07effb2804) --- diff --git a/ctdb/direct/4nodes.txt b/ctdb/direct/4nodes.txt new file mode 100644 index 00000000000..880fe914ffc --- /dev/null +++ b/ctdb/direct/4nodes.txt @@ -0,0 +1,4 @@ +127.0.0.1:9001 +127.0.0.2:9001 +127.0.0.3:9001 +127.0.0.4:9001 diff --git a/ctdb/tests/ctdb_fetch.c b/ctdb/tests/ctdb_fetch.c index 20dbc2b3c5b..abf360d5319 100644 --- a/ctdb/tests/ctdb_fetch.c +++ b/ctdb/tests/ctdb_fetch.c @@ -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 index 00000000000..33afcf86523 --- /dev/null +++ b/ctdb/tests/recover.sh @@ -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