]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Handle non-zero return codes in statschannel test
authorTom Krizek <tkrizek@isc.org>
Thu, 22 Jun 2023 16:49:55 +0000 (18:49 +0200)
committerTom Krizek <tkrizek@isc.org>
Fri, 14 Jul 2023 13:49:17 +0000 (15:49 +0200)
bin/tests/system/statschannel/tests.sh

index 1e3a28da169005a3e3a693bc560978495620afa8..567ea70db37c604ecd35c65472a16cd9da6ead32 100644 (file)
@@ -394,7 +394,7 @@ EOF
     lines=$(grep -c "^<statistics version" nc.out$n)
     test "$lines" = 2 || ret=1
     # keep-alive not needed in HTTP/1.1, second response has close
-    lines=$(grep -c "^Connection: Keep-Alive" nc.out$n)
+    lines=$(grep -c "^Connection: Keep-Alive" nc.out$n || true)
     test "$lines" = 0 || ret=1
     lines=$(grep -c "^Connection: close" nc.out$n)
     test "$lines" = 1 || ret=1
@@ -426,7 +426,7 @@ EOF
     lines=$(grep -c "^<statistics version" nc.out$n)
     test "$lines" = 2 || ret=1
     # keep-alive not needed in HTTP/1.1, second response has close
-    lines=$(grep -c "^Connection: Keep-Alive" nc.out$n)
+    lines=$(grep -c "^Connection: Keep-Alive" nc.out$n || true)
     test "$lines" = 0 || ret=1
     lines=$(grep -c "^Connection: close" nc.out$n)
     test "$lines" = 1 || ret=1
@@ -451,7 +451,7 @@ EOF
     lines=$(grep -c "^<statistics version" nc.out$n)
     test "$lines" = 2 || ret=1
     # first response has keep-alive, second has close
-    lines=$(grep -c "^Connection: Keep-Alive" nc.out$n)
+    lines=$(grep -c "^Connection: Keep-Alive" nc.out$n || true)
     test "$lines" = 1 || ret=1
     lines=$(grep -c "^Connection: close" nc.out$n)
     test "$lines" = 1 || ret=1
@@ -477,7 +477,7 @@ EOF
     lines=$(grep -c "^<statistics version" nc.out$n)
     test "$lines" = 1 || ret=1
     # no keep-alive, one close
-    lines=$(grep -c "^Connection: Keep-Alive" nc.out$n)
+    lines=$(grep -c "^Connection: Keep-Alive" nc.out$n || true)
     test "$lines" = 0 || ret=1
     lines=$(grep -c "^Connection: close" nc.out$n)
     test "$lines" = 1 || ret=1