first step towards fixing "make test" with the new daemon system
[samba.git] / ctdb / tests / bench.sh
index 74d8785bcb97ba22e3c5a9c4dec97a8eb2f8d084..778619488dd0fa4b97c466e9a6b158dd41f8aba6 100755 (executable)
@@ -1,6 +1,6 @@
 #!/bin/sh
 
-killall -q ctdb_bench
+killall -q ctdb_bench ctdbd
 
 NUMNODES=2
 if [ $# -gt 0 ]; then
@@ -12,10 +12,16 @@ for i in `seq 1 $NUMNODES`; do
   echo 127.0.0.$i >> nodes.txt
 done
 
+echo "Trying $NUMNODES nodes"
+for i in `seq 1 $NUMNODES`; do
+    $VALGRIND bin/ctdbd --reclock=rec.lock --nlist nodes.txt --event-script=tests/events --logfile=- --socket=sock.$i
+done
+
 killall -9 ctdb_bench
 echo "Trying $NUMNODES nodes"
 for i in `seq 1 $NUMNODES`; do
-  $VALGRIND bin/ctdb_bench --nlist nodes.txt --socket /tmp/ctdb.127.0.0.$i $* &
+  $VALGRIND bin/ctdb_bench --nlist nodes.txt --socket sock.$i $* &
 done
 
 wait
+ctdb shutdown --socket sock.1 -n all