diff --git a/bin/tests/system/logfileconfig/tests.sh b/bin/tests/system/logfileconfig/tests.sh index 00d0968395..c33522b2a5 100644 --- a/bin/tests/system/logfileconfig/tests.sh +++ b/bin/tests/system/logfileconfig/tests.sh @@ -14,7 +14,7 @@ # OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR # PERFORMANCE OF THIS SOFTWARE. -# $Id$ +# $Id: tests.sh,v 1.4 2011/03/22 16:51:50 smann Exp $ SYSTEMTESTTOP=.. . $SYSTEMTESTTOP/conf.sh @@ -54,33 +54,13 @@ status=0 echo "I:testing log file validity (only plain files allowed)" # First run with a known good config. -for i in 0 1 2 3 4 5 6 7 8 9 -do - test -f named.pid && break - sleep 1 -done -kill `cat named.pid` echo > $PLAINFILE cp $PLAINCONF named.conf -#$myRNDC reconfig -$myNAMED > /dev/null 2>&1 -if [ $? -ne 0 ] -then - echo "I: $myNAMED failed to start (UNEXPECTED)" - echo "I:exit status: 2" - exit 2 -fi - +$myRNDC reconfig grep "reloading configuration failed" named.run > /dev/null 2>&1 if [ $? -ne 0 ] then echo "I: testing plain file succeeded" - for i in 0 1 2 3 4 5 6 7 8 9 - do - test -f named.pid && break - sleep 1 - done - kill `cat named.pid` else echo "I: testing plain file failed (unexpected)" echo "I:exit status: 1" @@ -95,14 +75,7 @@ if [ $? -eq 0 ] then cp $DIRCONF named.conf echo > named.run - #$myRNDC reconfig - $myNAMED > /dev/null 2>&1 - if [ $? -eq 0 ] - then - echo "I: $myNAMED successfully started (UNEXPECTED)" - echo "I:exit status: 2" - exit 2 - fi + $myRNDC reconfig grep "configuring logging: invalid file" named.run > /dev/null 2>&1 if [ $? -ne 0 ] then @@ -124,15 +97,8 @@ if [ $? -eq 0 ] then cp $PIPECONF named.conf echo > named.run - #$myRNDC reconfig - $myNAMED > /dev/null 2>&1 - if [ $? -eq 0 ] - then - echo "I: $myNAMED successfully started (UNEXPECTED)" - echo "I:exit status: 2" - exit 2 - fi - grep "configuring logging: invalid file" named.run > /dev/null 2>&1 + $myRNDC reconfig + grep "configuring logging: invalid file" named.run > /dev/null 2>&1 if [ $? -ne 0 ] then echo "I: testing pipe file as log file succeeded (UNEXPECTED)" @@ -155,25 +121,12 @@ ln -s $PLAINFILE $SYMFILE >/dev/null 2>&1 if [ $? -eq 0 ] then cp $SYMCONF named.conf + $myRNDC reconfig echo > named.run - #$myRNDC reconfig - $myNAMED > /dev/null 2>&1 - if [ $? -ne 0 ] - then - echo "I: $myNAMED failed to started (UNEXPECTED)" - echo "I:exit status: 2" - exit 2 - fi grep "reloading configuration failed" named.run > /dev/null 2>&1 if [ $? -ne 0 ] then echo "I: testing symlink to plain file succeeded" - for i in 0 1 2 3 4 5 6 7 8 9 - do - test -f named.pid && break - sleep 1 - done - kill `cat named.pid` else echo "I: testing symlink to plain file failed (unexpected)" echo "I:exit status: 1"