From 96fe017aa13454fd41c52551cd73fb4f64438429 Mon Sep 17 00:00:00 2001 From: Remi Gacogne Date: Fri, 24 Jun 2016 18:36:22 +0200 Subject: [PATCH] auth: Don't fail if `socat` exits at the end of remote backend unix tests Every time I managed to reproduce that failure we sometimes get on travis, I have: ``` *** No errors detected 2016/06/24 17:28:00 socat[28022] E write(4, 0x6f33a0, 1): Broken pipe ERROR: Unable to stop "UNIX socket" test service: service (28022) not running ``` And that actually might make sense because `socat` is going to exit as soon as it gets an EOF, which will happen when the `remotebackend_unix.test` process stops. We would then be in a race to stop the `socat` process before it stops existing. --- modules/remotebackend/testrunner.sh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/modules/remotebackend/testrunner.sh b/modules/remotebackend/testrunner.sh index 6b06504916..86b85b2208 100755 --- a/modules/remotebackend/testrunner.sh +++ b/modules/remotebackend/testrunner.sh @@ -186,9 +186,8 @@ function stop_unix() { fi if ! kill -0 ${socat_pid} 2>/dev/null; then - # should never happen - did the test crashed the service? - echo >&2 "ERROR: Unable to stop \"UNIX socket\" test service: service (${socat_pid}) not running" - exit 69 + # might very well happen, since socat will stop after getting EOF + return 0 fi kill -TERM ${socat_pid} -- 2.47.2