1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-08 21:18:16 +03:00

For now, make tests/run_tests.sh runs the new test suite. Add

tests/TODO.  Remove tests/start_daemons.sh - no longer used.

Signed-off-by: Martin Schwenke <martin@meltin.net>

(This used to be ctdb commit 5cdbef46b74e6a5ba2383ef025e69fe605fa4f6e)
This commit is contained in:
Martin Schwenke 2009-01-12 15:47:12 +11:00
parent 2e87ed4e9d
commit 38593aa3e1
3 changed files with 5 additions and 51 deletions

4
ctdb/tests/TODO Normal file
View File

@ -0,0 +1,4 @@
* Make tests know about IPv6.
* Tests that write to database.
* Tests that check actual network connectivity on failover.
* Handle interrupting tests better.

View File

@ -1,10 +1,6 @@
#!/bin/sh
trap 'echo "Killing test"; killall -9 -q ctdbd; exit 1' INT TERM
tests/fetch.sh 4 || exit 1
tests/bench.sh 4 || exit 1
tests/ctdbd.sh || exit 1
tests/scripts/run_tests -s tests/simple/*.sh || exit 1
echo "All OK"
exit 0

View File

@ -1,46 +0,0 @@
#!/bin/sh
NUMNODES=2
if [ $# -gt 0 ]; then
NUMNODES=$1
fi
shift
NODES="./tests/nodes.txt"
PUBLIC_ADDRESSES=./tests/public_addresses.txt
rm -f $NODES $PUBLIC_ADDRESSES
for i in `seq 1 $NUMNODES`; do
if [ "${CTDB_USE_IPV6}x" != "x" ]; then
echo ::$i >> $NODES
ip addr add ::$i/128 dev lo
else
echo 127.0.0.$i >> $NODES
# 2 public addresses per node, just to make things interesting.
echo "192.0.2.$i/24 lo" >> $PUBLIC_ADDRESSES
echo "192.0.2.$(($i + $NUMNODES))/24 lo" >> $PUBLIC_ADDRESSES
fi
done
killall -q $PWD/bin/ctdbd
rm -rf test.db/persistent/*
CTDB_OPTIONS="--reclock=rec.lock --nlist $NODES --public-addresses $PUBLIC_ADDRESSES --nopublicipcheck --event-script-dir=tests/events.d --logfile=- -d 0 --dbdir=test.db --dbdir-persistent=test.db/persistent $*"
echo "Starting $NUMNODES ctdb daemons"
for i in `seq 1 $NUMNODES`; do
if [ `id -u` -eq 0 ]; then
CTDB_OPTIONS="$CTDB_OPTIONS --public-interface=lo"
fi
$VALGRIND bin/ctdbd --socket=sock.$i $CTDB_OPTIONS || exit 1
done
ln -sf $PWD/sock.1 /tmp/ctdb.socket || exit 1
while bin/ctdb status | egrep "DISCONNECTED|UNHEALTHY" > /dev/null; do
echo "`date` Waiting for recovery"
sleep 1;
done
echo "$NUMNODES daemons started"
exit 0