From: Lance Richardson Date: Thu, 25 Feb 2016 15:57:28 +0000 (-0500) Subject: tests: Gracefully terminate daemons in OVN tests X-Git-Url: http://git.cascardo.eti.br/?p=cascardo%2Fovs.git;a=commitdiff_plain;h=fcde56f53c701d6d49d912a4f6aa8da2e9c0cb94 tests: Gracefully terminate daemons in OVN tests Daemons started in OVN tests are currently killed (via "on_exit kill" in start_daemon()). This is problematic for tools (such as gcov) that rely on exit() being called. Fix by using "ovs-appctl ... exit" to gracefully terminate the daemons. Signed-off-by: Lance Richardson Tested-by: Aaron Conole Signed-off-by: Ben Pfaff --- diff --git a/tests/ovn-controller.at b/tests/ovn-controller.at index 4218fbe57..2ff56af61 100644 --- a/tests/ovn-controller.at +++ b/tests/ovn-controller.at @@ -114,4 +114,6 @@ AT_CHECK([ovn-sbctl \ -- set Port_Binding baz type='""' options='{}']) check_patches +# Gracefully terminate ovn-controller +ovs-appctl -t ovn-controller exit AT_CLEANUP diff --git a/tests/ovn.at b/tests/ovn.at index 0917e8d0e..0bc5e5814 100644 --- a/tests/ovn.at +++ b/tests/ovn.at @@ -746,6 +746,11 @@ for i in 1 2 3; do echo done done + +# Gracefully terminate daemons +for daemon in ovn-controller ovn-northd ovsdb-server; do + ovs-appctl -t $daemon exit +done AT_CLEANUP # 2 hypervisors, 4 logical ports per HV @@ -894,6 +899,10 @@ for i in 1 2; do done done +# Gracefully terminate daemons +for daemon in ovn-controller ovn-northd ovsdb-server; do + ovs-appctl -t $daemon exit +done AT_CLEANUP AT_SETUP([ovn -- 3 HVs, 1 VIFs/HV, 1 GW, 1 LS]) @@ -1050,6 +1059,11 @@ for i in 1 2 3; do AT_CHECK([sort $i.packets], [0], [expout]) echo done + +# Gracefully terminate daemons +for daemon in ovs-vtep ovn-controller-vtep ovn-controller ovn-northd ovsdb-server; do + ovs-appctl -t $daemon exit +done AT_CLEANUP # 3 hypervisors, 3 logical switches with 3 logical ports each, 1 logical router @@ -1322,4 +1336,9 @@ for i in 1 2 3; do done done done + +# Gracefully terminate daemons +for daemon in ovn-controller ovn-northd ovsdb-server; do + ovs-appctl -t $daemon exit +done AT_CLEANUP