From: Mark Andrews Date: Mon, 8 Jan 2018 05:20:38 +0000 (+1100) Subject: write nextpart to disk so that it is available when tests fail X-Git-Tag: v9.13.0~290 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=02d3f1e855465964c42d4d62e39ef3ba24c69bf8;p=thirdparty%2Fbind9.git write nextpart to disk so that it is available when tests fail --- diff --git a/bin/tests/system/sfcache/clean.sh b/bin/tests/system/sfcache/clean.sh index 3b526cdd558..42c4ec37181 100644 --- a/bin/tests/system/sfcache/clean.sh +++ b/bin/tests/system/sfcache/clean.sh @@ -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* diff --git a/bin/tests/system/sfcache/tests.sh b/bin/tests/system/sfcache/tests.sh index b3dc27f5ea7..e3f15604ea5 100644 --- a/bin/tests/system/sfcache/tests.sh +++ b/bin/tests/system/sfcache/tests.sh @@ -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`