Handle non-zero return codes in statschannel test
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user