]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
write nextpart to disk so that it is available when tests fail
authorMark Andrews <marka@isc.org>
Mon, 8 Jan 2018 05:20:38 +0000 (16:20 +1100)
committerMark Andrews <marka@isc.org>
Mon, 8 Jan 2018 05:20:38 +0000 (16:20 +1100)
bin/tests/system/sfcache/clean.sh
bin/tests/system/sfcache/tests.sh

index 3b526cdd558eb74b05792185099d4e9cbc35644c..42c4ec37181611e66124cd47d4a7fcc8d8d270aa 100644 (file)
@@ -13,3 +13,4 @@ rm -f */named.run */named.run.prev
 rm -f dig.*
 rm -f sfcache.*
 rm -f ns*/named.lock
+rm -f named.run.part*
index b3dc27f5ea7a573b4675e7253135ac80a2c7164c..e3f15604ea5276ff0eb187c382ab4df6364023f8 100644 (file)
@@ -68,7 +68,8 @@ ret=0
 nextpart ns5/named.run > /dev/null
 $DIG $DIGOPTS bar.example. a @10.53.0.5 > dig.out.ns5.test$n || ret=1
 grep "SERVFAIL" dig.out.ns5.test$n > /dev/null || ret=1
-nextpart ns5/named.run | grep 'servfail cache hit bar.example/A (CD=0)' > /dev/null || ret=1
+nextpart ns5/named.run > ns5/named.run.part$n
+grep 'servfail cache hit bar.example/A (CD=0)' ns5/named.run.part$n > /dev/null || ret=1
 n=`expr $n + 1`
 if [ $ret != 0 ]; then echo "I:failed"; fi
 status=`expr $status + $ret`
@@ -77,7 +78,8 @@ echo "I:checking cache is bypassed with +cd query ($n)"
 ret=0
 $DIG $DIGOPTS +cd bar.example. a @10.53.0.5 > dig.out.ns5.test$n || ret=1
 grep "SERVFAIL" dig.out.ns5.test$n > /dev/null || ret=1
-nextpart ns5/named.run | grep 'servfail cache hit' > /dev/null && ret=1
+nextpart ns5/named.run > ns5/named.run.part$n
+grep 'servfail cache hit' ns5/named.run.part$n > /dev/null && ret=1
 n=`expr $n + 1`
 if [ $ret != 0 ]; then echo "I:failed"; fi
 status=`expr $status + $ret`
@@ -86,7 +88,8 @@ echo "I:checking cache is used for subsequent +cd query ($n)"
 ret=0
 $DIG $DIGOPTS +dnssec bar.example. a @10.53.0.5 > dig.out.ns5.test$n || ret=1
 grep "SERVFAIL" dig.out.ns5.test$n > /dev/null || ret=1
-nextpart ns5/named.run | grep 'servfail cache hit bar.example/A (CD=1)' > /dev/null || ret=1
+nextpart ns5/named.run > ns5/named.run.part$n
+grep 'servfail cache hit bar.example/A (CD=1)' ns5/named.run.part$n > /dev/null || ret=1
 n=`expr $n + 1`
 if [ $ret != 0 ]; then echo "I:failed"; fi
 status=`expr $status + $ret`