From ad228308961c350aab3b6df4a33d3e6beab9a588 Mon Sep 17 00:00:00 2001 From: Pawel Niedzwiecki Date: Wed, 7 Mar 2018 19:27:02 +0100 Subject: [PATCH] test/common: exit with error in waitforlisten() if app crashed In some cases, if vhost crashes on startup, test would continue normally instead of failing Change-Id: If2f82b5e3dad07403051353d6fcf5e83d5d002c0 Signed-off-by: Pawel Niedzwiecki Reviewed-on: https://review.gerrithub.io/403064 Tested-by: SPDK Automated Test System Reviewed-by: Jim Harris Reviewed-by: Daniel Verkamp --- test/common/autotest_common.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/common/autotest_common.sh b/test/common/autotest_common.sh index fdb1e4083..5f891f7ad 100755 --- a/test/common/autotest_common.sh +++ b/test/common/autotest_common.sh @@ -212,7 +212,7 @@ function waitforlisten() { # if the process is no longer running, then exit the script # since it means the application crashed if ! kill -s 0 $1; then - exit + exit 1 fi if netstat -an -x | grep -iw LISTENING | grep -q $rpc_addr; then ret=0