diff options
-rw-r--r-- | tests/ovs-macros.at | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/ovs-macros.at b/tests/ovs-macros.at index f2923b0f8..dc7b700f7 100644 --- a/tests/ovs-macros.at +++ b/tests/ovs-macros.at @@ -135,8 +135,9 @@ dnl dnl Ask the daemon named DAEMON to exit, via ovs-appctl, and then waits for it dnl to exit. m4_define([OVS_APP_EXIT_AND_WAIT], - [ovs-appctl -t $1 exit - OVS_WAIT_WHILE([test -e $1.pid])]) + [TMPPID=`cat "$OVS_RUNDIR"/$1.pid 2>/dev/null` + AT_CHECK([ovs-appctl -t $1 exit]) + OVS_WAIT_WHILE([kill -0 $TMPPID 2>/dev/null])]) dnl on_exit "COMMAND" dnl |