- cleanup persistent db at start
authorAndrew Tridgell <tridge@samba.org>
Wed, 30 Jul 2008 03:20:47 +0000 (13:20 +1000)
committerAndrew Tridgell <tridge@samba.org>
Wed, 30 Jul 2008 03:20:47 +0000 (13:20 +1000)
- catch SIGINT and kill daemons

tests/fetch.sh
tests/persistent.sh

index f4c820a83f1dadaaa47a1f69ecd0c7355aab800b..a0753215c7f8ebf6b5e9eb1a658c3f5bcce5856f 100755 (executable)
@@ -5,6 +5,8 @@ if [ $# -gt 0 ]; then
     NUMNODES=$1
 fi
 
+trap 'echo "Killing test"; killall -9 -q ctdbd ctdb_fetch; exit 1' INT TERM
+
 tests/start_daemons.sh $NUMNODES || exit 1
 
 
index 327f8bcce9a4f5596494605b879806de2462874f..112e9fde2a72f9b004bdc2c0269cd8873626c937 100755 (executable)
@@ -5,14 +5,19 @@ if [ $# -gt 0 ]; then
     NUMNODES=$1
 fi
 
+killall -9 -q ctdb_persistent ctdbd
+
+rm -rf test.db/persistent
 
 echo "Starting $NUMNODES daemons for SAFE persistent writes"
 tests/start_daemons.sh $NUMNODES || exit 1
 
-killall -9 -q ctdb_persistent
+trap 'echo "Killing test"; killall -9 -q ctdbd ctdb_persistent; exit 1' INT TERM
+
 
 for i in `seq 1 $NUMNODES`; do
   $VALGRIND bin/ctdb_persistent --timelimit 30 --socket sock.$i $* &
+  $VALGRIND bin/ctdb_persistent --timelimit 30 --socket sock.$i $* &
 done
 wait
 
@@ -29,6 +34,7 @@ killall -9 -q ctdb_persistent
 
 for i in `seq 1 $NUMNODES`; do
   $VALGRIND bin/ctdb_persistent --unsafe-writes --timelimit 30 --socket sock.$i $* &
+  $VALGRIND bin/ctdb_persistent --unsafe-writes --timelimit 30 --socket sock.$i $* &
 done
 wait