From: Remi Gacogne Date: Fri, 24 Jun 2016 16:36:22 +0000 (+0200) Subject: auth: Don't fail if `socat` exits at the end of remote backend unix tests X-Git-Tag: rec-4.0.0~14^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=96fe017aa13454fd41c52551cd73fb4f64438429;p=thirdparty%2Fpdns.git 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. --- 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}