From a8ba0da26293ed3367a40c4e586a4e6d4ba37e4d Mon Sep 17 00:00:00 2001 From: Xavier Simonart Date: Fri, 3 Nov 2023 14:42:55 +0100 Subject: [PATCH] tests: fixed "ovn-nbctl - daemon retry connection" "kill pid" does not wait for process to be terminated. Wait for ovsdb-server termination before restarting it. Signed-off-by: Xavier Simonart Signed-off-by: Dumitru Ceara (cherry picked from commit 8b65cbd0cb8585ba8a9672239e3fcaba23837fbd) --- tests/ovn-nbctl.at | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/ovn-nbctl.at b/tests/ovn-nbctl.at index 478a32f5a2..eed2f86925 100644 --- a/tests/ovn-nbctl.at +++ b/tests/ovn-nbctl.at @@ -2618,7 +2618,9 @@ dnl --------------------------------------------------------------------- AT_SETUP([ovn-nbctl - daemon retry connection]) OVN_NBCTL_TEST_START daemon -AT_CHECK([kill `cat ovsdb-server.pid`]) +pid=$(cat ovsdb-server.pid) +AT_CHECK([kill $pid]) +OVS_WAIT_WHILE([kill -0 $pid 2>/dev/null]) AT_CHECK([ovsdb-server --detach --no-chdir --pidfile --log-file --remote=punix:$OVS_RUNDIR/ovnnb_db.sock ovn-nb.db], [0], [], [stderr]) AT_CHECK([ovn-nbctl show], [0], [ignore]) OVN_NBCTL_TEST_STOP "/terminating with signal 15/d"