killall -q ctdbd
echo "Starting 2 ctdb daemons"
-$VALGRIND bin/ctdbd --nlist direct/nodes.txt
-$VALGRIND bin/ctdbd --nlist direct/nodes.txt
+$VALGRIND bin/ctdbd --nlist direct/nodes.txt --event-script=tests/events --logfile=-
+$VALGRIND bin/ctdbd --nlist direct/nodes.txt --event-script=tests/events --logfile=-
+
+sleep 2
echo "Testing ping"
$VALGRIND bin/ctdb ping || exit 1
$VALGRIND bin/ctdb -n all statisticsreset || exit 1
echo "Testing debug"
-$VALGRIND bin/ctdb -n all setdebug 5 || exit 1
+$VALGRIND bin/ctdb -n all setdebug 3 || exit 1
$VALGRIND bin/ctdb -n all getdebug || exit 1
$VALGRIND bin/ctdb -n all setdebug 0 || exit 1
$VALGRIND bin/ctdb -n all getdebug || exit 1
echo "Testing getdbmap"
$VALGRIND bin/ctdb getdbmap || exit 1
-echo "All done"
+echo "Testing status"
+$VALGRIND bin/ctdb status || exit 1
+sleep 1
+
+echo "Testing shutdown"
+$VALGRIND bin/ctdb shutdown -n all || exit 1
+
+sleep 1
+
+echo "All done"
killall -q ctdbd