mirror of
https://github.com/openvswitch/ovs
synced 2025-08-22 09:58:01 +00:00
daemon.at: Correctly terminate ovsdb process in a backtrace test.
In a backtrace test with monitor the child process will be re-started after being killed. The test doesn't wait for that to happen, so it is possible that during the test cleanup the pid in a pid file is not updated yet. Hence, the on-exit hook will not kill the process. This is causing issues in Cirrus CI, because gmake on FreBSD waits for all child processes to exit and that never happens. Fix the issue by waiting for a new process. It's also better to exit gracefully instead of relying on the on-exit kill. Fixes: 759a29dc2d97 ("backtrace: Extend the backtrace functionality.") Acked-by: Ales Musil <amusil@redhat.com> Acked-by: Eelco Chaudron <echaudro@redhat.com> Signed-off-by: Ilya Maximets <i.maximets@ovn.org>
This commit is contained in:
parent
24520a401e
commit
f5188ff214
@ -284,4 +284,8 @@ AT_CHECK([kill -SEGV $child])
|
|||||||
OVS_WAIT_UNTIL([grep -q "backtrace(monitor)|WARN|SIGSEGV detected, backtrace:" ovsdb-server.log])
|
OVS_WAIT_UNTIL([grep -q "backtrace(monitor)|WARN|SIGSEGV detected, backtrace:" ovsdb-server.log])
|
||||||
OVS_WAIT_UNTIL([grep -q "daemon_unix(monitor)|ERR|1 crashes: pid .* died, killed (Segmentation fault)" ovsdb-server.log])
|
OVS_WAIT_UNTIL([grep -q "daemon_unix(monitor)|ERR|1 crashes: pid .* died, killed (Segmentation fault)" ovsdb-server.log])
|
||||||
|
|
||||||
|
# Wait until a new process is started before exiting, so it will be
|
||||||
|
# stopped correctly.
|
||||||
|
OVS_WAIT_UNTIL([test -s ovsdb-server.pid && test $(cat ovsdb-server.pid) != $child])
|
||||||
|
OVS_APP_EXIT_AND_WAIT([ovsdb-server])
|
||||||
AT_CLEANUP
|
AT_CLEANUP
|
||||||
|
Loading…
x
Reference in New Issue
Block a user