From 20cb585b0aacd32973939a0e0646526212910c74 Mon Sep 17 00:00:00 2001 From: Pawel Niedzwiecki Date: Tue, 6 Feb 2018 17:40:37 +0100 Subject: [PATCH] test/vhost: check vhost return code in spdk_vhost_kill if vhost retuns error on exit using spdk_vhost_kill, the tests would continue instead failing Change-Id: I923d579f9e8614c39b27186418439d185770b3a7 Signed-off-by: Pawel Niedzwiecki Reviewed-on: https://review.gerrithub.io/398622 Tested-by: SPDK Automated Test System Reviewed-by: Jim Harris Reviewed-by: Daniel Verkamp --- test/vhost/common/common.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/test/vhost/common/common.sh b/test/vhost/common/common.sh index 168deccfc..f025fb2db 100644 --- a/test/vhost/common/common.sh +++ b/test/vhost/common/common.sh @@ -157,6 +157,9 @@ function spdk_vhost_kill() rm $vhost_pid_file return 1 fi + + #check vhost return code, activate trap on error + wait $vhost_pid elif /bin/kill -0 $vhost_pid; then error "vhost NOT killed - you need to kill it manually" return 1