Skip to content

Commit

Permalink
tests: Gracefully terminate daemons in OVN tests
Browse files Browse the repository at this point in the history
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 <[email protected]>
Tested-by: Aaron Conole <[email protected]>
Signed-off-by: Ben Pfaff <[email protected]>
  • Loading branch information
hlrichardson authored and blp committed Feb 25, 2016
1 parent 8bf009b commit fcde56f
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tests/ovn-controller.at
Original file line number Diff line number Diff line change
Expand Up @@ -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
19 changes: 19 additions & 0 deletions tests/ovn.at
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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])
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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

0 comments on commit fcde56f

Please sign in to comment.