From: Martin Schwenke Date: Tue, 5 Nov 2019 04:34:18 +0000 (+1100) Subject: ctdb-tests: Make process exists test more resilient X-Git-Tag: talloc-2.3.1~137 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=bf99f82077876fc107adb1ed4f07dd7e1351fff9;p=thirdparty%2Fsamba.git ctdb-tests: Make process exists test more resilient This can fail as follows: --==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==-- Running test ./tests/UNIT/tool/ctdb.process-exists.003.sh (02:26:30) --==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==-- ctdb.process-exists.003 - ctdbd process with multiple connections on node 0 Setting up fake ctdbd <10||0| OK <10|PID 26107 exists |0| OK ================================================== Running "ctdb -d NOTICE process-exists 26107 0x1234567812345678" PASSED ================================================== Running "ctdb -d NOTICE process-exists 26107 0xaebbccdd12345678" Registered SRVID 0xaebbccdd12345678 -------------------------------------------------- Output (Exit status: 1): -------------------------------------------------- PID 26107 with SRVID 0xaebbccdd12345678 does not exist -------------------------------------------------- Required output (Exit status: 0): -------------------------------------------------- PID 26107 with SRVID 0xaebbccdd12345678 exists FAILED connection to daemon closed, exiting ========================================================================== TEST FAILED: ./tests/UNIT/tool/ctdb.process-exists.003.sh (status 1) (duration: 0s) ========================================================================== This happens when dummy_client has not registered the SRVID (for its 10th connection) before the 2nd simple_test. Change the initial wait to ensure that the SRVID is registered. Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs Autobuild-User(master): Amitay Isaacs Autobuild-Date(master): Wed Nov 6 02:46:24 UTC 2019 on sn-devel-184 --- diff --git a/ctdb/tests/UNIT/tool/ctdb.process-exists.003.sh b/ctdb/tests/UNIT/tool/ctdb.process-exists.003.sh index 29c42a1a627..402b0d6f5ab 100755 --- a/ctdb/tests/UNIT/tool/ctdb.process-exists.003.sh +++ b/ctdb/tests/UNIT/tool/ctdb.process-exists.003.sh @@ -16,7 +16,7 @@ srvid="0xaebbccdd12345678" dummy_client -d INFO -s "$ctdbd_socket" -n 10 -S "$srvid" & pid=$! -wait_until 10 $CTDB process-exists "$pid" +wait_until 10 $CTDB process-exists "$pid" "$srvid" srvid2="0x1234567812345678" required_result 1 "PID $pid with SRVID $srvid2 does not exist"