From: Martin Schwenke Date: Wed, 25 Oct 2017 01:15:23 +0000 (+1100) Subject: ctdb-tests: Process-exists unit tests should wait until PID is registered X-Git-Tag: samba-4.6.10~37 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=781e5a67171df60978c0f759bd20e64b171c71fa;p=thirdparty%2Fsamba.git ctdb-tests: Process-exists unit tests should wait until PID is registered Otherwise the client registration can race with the check in the test. BUG: https://bugzilla.samba.org/show_bug.cgi?id=13097 Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs Autobuild-User(master): Amitay Isaacs Autobuild-Date(master): Thu Oct 26 13:32:24 CEST 2017 on sn-devel-144 (cherry picked from commit 0e8b781e0740310d251bf1fa7db7a467d4f7f9b5) --- diff --git a/ctdb/tests/tool/ctdb.process-exists.001.sh b/ctdb/tests/tool/ctdb.process-exists.001.sh index 2339344fec5..1b6d213b3ad 100755 --- a/ctdb/tests/tool/ctdb.process-exists.001.sh +++ b/ctdb/tests/tool/ctdb.process-exists.001.sh @@ -14,6 +14,8 @@ EOF dummy_client -s $ctdbd_socket & pid=$! +wait_until 10 $CTDB process-exists "$pid" + ok "PID $pid exists" simple_test "$pid"