1
0
mirror of https://github.com/samba-team/samba.git synced 2025-03-20 22:50:26 +03:00

remove sleep from the fetch test

add a test script to start 4 daemons to test recovery

(This used to be ctdb commit 09eab12b00934afa5159fc500faf6b07effb2804)
This commit is contained in:
Ronnie Sahlberg 2007-05-02 13:14:12 +10:00
parent d20990c2b6
commit c06c1e1f9f
3 changed files with 41 additions and 1 deletions

4
ctdb/direct/4nodes.txt Normal file
View File

@ -0,0 +1,4 @@
127.0.0.1:9001
127.0.0.2:9001
127.0.0.3:9001
127.0.0.4:9001

View 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);

37
ctdb/tests/recover.sh Executable file
View File

@ -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