parallelize most system tests
This commit is contained in:
@@ -7,21 +7,23 @@
|
||||
SYSTEMTESTTOP=..
|
||||
. $SYSTEMTESTTOP/conf.sh
|
||||
|
||||
RNDCCMD="$RNDC -c $SYSTEMTESTTOP/common/rndc.conf -p ${CONTROLPORT} -s"
|
||||
|
||||
status=0
|
||||
n=0
|
||||
|
||||
n=`expr $n + 1`
|
||||
echo "I:verifying that named started normally ($n)"
|
||||
echo_i "verifying that named started normally ($n)"
|
||||
ret=0
|
||||
[ -s ns2/named.pid ] || ret=1
|
||||
grep "unable to listen on any configured interface" ns2/named.run > /dev/null && ret=1
|
||||
grep "another named process" ns2/named.run > /dev/null && ret=1
|
||||
if [ $ret != 0 ]; then echo "I:failed"; fi
|
||||
if [ $ret != 0 ]; then echo_i "failed"; fi
|
||||
status=`expr $status + $ret`
|
||||
|
||||
if [ ! "$CYGWIN" ]; then
|
||||
n=`expr $n + 1`
|
||||
echo "I:verifying that named checks for conflicting listeners ($n)"
|
||||
echo_i "verifying that named checks for conflicting listeners ($n)"
|
||||
ret=0
|
||||
(cd ns2; $NAMED -c named-alt1.conf -D ns2-extra-1 -X other.lock -m record,size,mctx -d 99 -g -U 4 >> named2.run 2>&1 & )
|
||||
for i in 1 2 3 4 5 6 7 8 9
|
||||
@@ -37,67 +39,67 @@ if [ ! "$CYGWIN" ]; then
|
||||
done
|
||||
pid=`cat ns2/named2.pid 2>/dev/null`
|
||||
test "${pid:+set}" = set && $KILL -15 ${pid} >/dev/null 2>&1
|
||||
if [ $ret != 0 ]; then echo "I:failed"; fi
|
||||
if [ $ret != 0 ]; then echo_i "failed"; fi
|
||||
status=`expr $status + $ret`
|
||||
fi
|
||||
|
||||
n=`expr $n + 1`
|
||||
echo "I:verifying that named checks for conflicting named processes ($n)"
|
||||
echo_i "verifying that named checks for conflicting named processes ($n)"
|
||||
ret=0
|
||||
(cd ns2; $NAMED -c named-alt2.conf -D ns2-extra-2 -X named.lock -m record,size,mctx -d 99 -g -U 4 >> named3.run 2>&1 & )
|
||||
sleep 2
|
||||
grep "another named process" ns2/named3.run > /dev/null || ret=1
|
||||
pid=`cat ns2/named3.pid 2>/dev/null`
|
||||
test "${pid:+set}" = set && $KILL -15 ${pid} >/dev/null 2>&1
|
||||
if [ $ret != 0 ]; then echo "I:failed"; fi
|
||||
if [ $ret != 0 ]; then echo_i "failed"; fi
|
||||
status=`expr $status + $ret`
|
||||
|
||||
n=`expr $n + 1`
|
||||
echo "I:verifying that 'lock-file none' disables process check ($n)"
|
||||
echo_i "verifying that 'lock-file none' disables process check ($n)"
|
||||
ret=0
|
||||
(cd ns2; $NAMED -c named-alt3.conf -D ns2-extra-3 -m record,size,mctx -d 99 -g -U 4 >> named4.run 2>&1 & )
|
||||
sleep 2
|
||||
grep "another named process" ns2/named4.run > /dev/null && ret=1
|
||||
pid=`cat ns2/named4.pid 2>/dev/null`
|
||||
test "${pid:+set}" = set && $KILL -15 ${pid} >/dev/null 2>&1
|
||||
if [ $ret != 0 ]; then echo "I:failed"; fi
|
||||
if [ $ret != 0 ]; then echo_i "failed"; fi
|
||||
status=`expr $status + $ret`
|
||||
|
||||
n=`expr $n + 1`
|
||||
echo "I: checking that named refuses to reconfigure if working directory is not writable ($n)"
|
||||
echo_i "checking that named refuses to reconfigure if working directory is not writable ($n)"
|
||||
ret=0
|
||||
cp -f ns2/named-alt4.conf ns2/named.conf
|
||||
$RNDC -c ../common/rndc.conf -s 10.53.0.2 -p 9953 reconfig > rndc.out.$n 2>&1
|
||||
copy_setports ns2/named-alt4.conf.in ns2/named.conf
|
||||
$RNDCCMD 10.53.0.2 reconfig > rndc.out.$n 2>&1
|
||||
grep "failed: permission denied" rndc.out.$n > /dev/null 2>&1 || ret=1
|
||||
sleep 1
|
||||
grep "[^-]directory './nope' is not writable" ns2/named.run > /dev/null 2>&1 || ret=1
|
||||
if [ $ret != 0 ]; then echo "I:failed"; fi
|
||||
if [ $ret != 0 ]; then echo_i "failed"; fi
|
||||
status=`expr $status + $ret`
|
||||
|
||||
n=`expr $n + 1`
|
||||
echo "I: checking that named refuses to reconfigure if managed-keys-directory is not writable ($n)"
|
||||
echo_i "checking that named refuses to reconfigure if managed-keys-directory is not writable ($n)"
|
||||
ret=0
|
||||
cp -f ns2/named-alt5.conf ns2/named.conf
|
||||
$RNDC -c ../common/rndc.conf -s 10.53.0.2 -p 9953 reconfig > rndc.out.$n 2>&1
|
||||
copy_setports ns2/named-alt5.conf.in ns2/named.conf
|
||||
$RNDCCMD 10.53.0.2 reconfig > rndc.out.$n 2>&1
|
||||
grep "failed: permission denied" rndc.out.$n > /dev/null 2>&1 || ret=1
|
||||
sleep 1
|
||||
grep "managed-keys-directory './nope' is not writable" ns2/named.run > /dev/null 2>&1 || ret=1
|
||||
if [ $ret != 0 ]; then echo "I:failed"; fi
|
||||
if [ $ret != 0 ]; then echo_i "failed"; fi
|
||||
status=`expr $status + $ret`
|
||||
|
||||
n=`expr $n + 1`
|
||||
echo "I: checking that named refuses to reconfigure if new-zones-directory is not writable ($n)"
|
||||
echo_i "checking that named refuses to reconfigure if new-zones-directory is not writable ($n)"
|
||||
ret=0
|
||||
cp -f ns2/named-alt6.conf ns2/named.conf
|
||||
$RNDC -c ../common/rndc.conf -s 10.53.0.2 -p 9953 reconfig > rndc.out.$n 2>&1
|
||||
copy_setports ns2/named-alt6.conf.in ns2/named.conf
|
||||
$RNDCCMD 10.53.0.2 reconfig > rndc.out.$n 2>&1
|
||||
grep "failed: permission denied" rndc.out.$n > /dev/null 2>&1 || ret=1
|
||||
sleep 1
|
||||
grep "new-zones-directory './nope' is not writable" ns2/named.run > /dev/null 2>&1 || ret=1
|
||||
if [ $ret != 0 ]; then echo "I:failed"; fi
|
||||
if [ $ret != 0 ]; then echo_i "failed"; fi
|
||||
status=`expr $status + $ret`
|
||||
|
||||
n=`expr $n + 1`
|
||||
echo "I: checking that named refuses to start if working directory is not writable ($n)"
|
||||
echo_i "checking that named refuses to start if working directory is not writable ($n)"
|
||||
ret=0
|
||||
cd ns2
|
||||
$NAMED -c named-alt4.conf -d 99 -g > named4.run 2>&1 &
|
||||
@@ -110,11 +112,11 @@ test "${pid:+set}" = set && $KILL -15 ${pid} >/dev/null 2>&1
|
||||
pid=`cat ../named.pid 2>/dev/null`
|
||||
test "${pid:+set}" = set && $KILL -15 ${pid} >/dev/null 2>&1
|
||||
cd ..
|
||||
if [ $ret != 0 ]; then echo "I:failed"; fi
|
||||
if [ $ret != 0 ]; then echo_i "failed"; fi
|
||||
status=`expr $status + $ret`
|
||||
|
||||
n=`expr $n + 1`
|
||||
echo "I: checking that named refuses to start if managed-keys-directory is not writable ($n)"
|
||||
echo_i "checking that named refuses to start if managed-keys-directory is not writable ($n)"
|
||||
ret=0
|
||||
cd ns2
|
||||
$NAMED -c named-alt5.conf -d 99 -g > named5.run 2>&1 &
|
||||
@@ -127,8 +129,8 @@ test "${pid:+set}" = set && $KILL -15 ${pid} >/dev/null 2>&1
|
||||
pid=`cat ../named.pid 2>/dev/null`
|
||||
test "${pid:+set}" = set && $KILL -15 ${pid} >/dev/null 2>&1
|
||||
cd ..
|
||||
if [ $ret != 0 ]; then echo "I:failed"; fi
|
||||
if [ $ret != 0 ]; then echo_i "failed"; fi
|
||||
status=`expr $status + $ret`
|
||||
|
||||
echo "I:exit status: $status"
|
||||
echo_i "exit status: $status"
|
||||
[ $status -eq 0 ] || exit 1
|
||||
|
||||
Reference in New Issue
Block a user