]> git.ipfire.org Git - thirdparty/unbound.git/commitdiff
Fix test to check if server up afterwards
authorW.C.A. Wijngaards <wouter@nlnetlabs.nl>
Thu, 6 Feb 2020 09:25:47 +0000 (10:25 +0100)
committerW.C.A. Wijngaards <wouter@nlnetlabs.nl>
Thu, 6 Feb 2020 09:25:47 +0000 (10:25 +0100)
testdata/tcp_req_size.tdir/tcp_req_size.test

index 0260b2117ff3dfb61a34e981c3a62907fd9ce4d4..4417771563a2208ab643fdc117b82a346eb87106 100644 (file)
@@ -95,6 +95,33 @@ else
        echo "result contents not OK"
        exit 1
 fi
+echo "OK"
+
+# check that the server is still up
+echo ""
+echo "> query www1.example.net. (again check if server up)"
+$PRE/streamtcp -f 127.0.0.1@$UNBOUND_PORT www1.example.net. A IN >outfile 2>&1
+cat outfile
+if test "$?" -ne 0; then
+       echo "exit status not OK"
+       echo "> cat logfiles"
+       cat outfile
+       cat fwd.log
+       cat unbound.log
+       echo "Not OK"
+       exit 1
+fi
+if grep "www1.example.net" outfile | grep "1.2.3.1"; then
+       echo "content OK"
+else
+       echo "result contents not OK"
+       echo "> cat logfiles"
+       cat outfile
+       cat fwd.log
+       cat unbound.log
+       echo "result contents not OK"
+       exit 1
+fi
 
 echo "OK"
 exit 0