ssl-opt.sh: if the server fails, do treat it as a test failure

This used to be the case a long time ago but was accidentally broken.

Fix <github:nogrep> #4103 for ssl-opt.sh.

Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
This commit is contained in:
Gilles Peskine 2021-02-02 23:29:03 +01:00
parent fee234afcd
commit 634fe27a12

View File

@ -676,6 +676,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
@ -710,8 +711,8 @@ run_test() {
fi
# check server exit code
if [ $? != 0 ]; then
fail "server fail"
if [ $SRV_RET != 0 ]; then
fail "Server exited with status $SRV_RET"
return
fi