aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Levon <john.levon@nutanix.com>2021-03-26 13:28:19 +0000
committerGitHub <noreply@github.com>2021-03-26 13:28:19 +0000
commitb60e47f9271a400ba68fe10465107950990eff78 (patch)
treed57562039b07204fac52600718beb9ca6cdcb103
parent710a0081aa206b319161fac9bbafce14f5045ee8 (diff)
downloadlibvfio-user-b60e47f9271a400ba68fe10465107950990eff78.zip
libvfio-user-b60e47f9271a400ba68fe10465107950990eff78.tar.gz
libvfio-user-b60e47f9271a400ba68fe10465107950990eff78.tar.bz2
clean up client/server test properly on failure (#404)
We need to make sure to kill the server process if the client fails. Signed-off-by: John Levon <john.levon@nutanix.com> Reviewed-by: Thanos Makatos <thanos.makatos@nutanix.com>
-rwxr-xr-xtest/test-client-server.sh4
1 files changed, 3 insertions, 1 deletions
diff --git a/test/test-client-server.sh b/test/test-client-server.sh
index 866fd95..826c7ed 100755
--- a/test/test-client-server.sh
+++ b/test/test-client-server.sh
@@ -17,5 +17,7 @@ ${valgrind} ../samples/server ${sock} &
while [ ! -S ${sock} ]; do
sleep 0.1
done
-${valgrind} ../samples/client ${sock}
+${valgrind} ../samples/client ${sock} || {
+ kill $(jobs -p)
+}
wait