Merge pull request #4109 from gilles-peskine-arm/ssl-opt-server-failure-development

ssl-opt.sh: if the server fails, do treat it as a test failure
This commit is contained in:
Manuel Pégourié-Gonnard 2021-02-12 12:15:50 +01:00 committed by GitHub
commit 97ce71daca
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -770,6 +770,7 @@ run_test() {
# terminate the server (and the proxy)
kill $SRV_PID
wait $SRV_PID
SRV_RET=$?
if [ -n "$PXY_CMD" ]; then
kill $PXY_PID >/dev/null 2>&1
@ -803,9 +804,11 @@ run_test() {
fi
fi
# check server exit code
if [ $? != 0 ]; then
fail "server fail"
# Check server exit code (only for Mbed TLS: GnuTLS and OpenSSL don't
# exit with status 0 when interrupted by a signal, and we don't really
# care anyway), in case e.g. the server reports a memory leak.
if [ $SRV_RET != 0 ] && is_polar "$SRV_CMD"; then
fail "Server exited with status $SRV_RET"
return
fi