Handle non-zero return codes in statschannel test

This commit is contained in:
Tom Krizek 2023-06-22 18:49:55 +02:00
parent 4a87b44196
commit cde02fdb6a
No known key found for this signature in database
GPG key ID: 01623B9B652A20A7

View 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