tests: Add timeout to OVS_APP_EXIT_AND_WAIT.
ovs-appctl can wait indefinitely while executing an exit for a
dead service. Let's add a timeout (10 seconds should be
reasonable) to exit calls to avoid hanging up of the testsuite
in such cases.
@@ -199,8 +199,8 @@ m4_define([OVS_APP_EXIT_AND_WAIT],
[AT_CHECK([test -e $OVS_RUNDIR/$1.pid])
TMPPID=$(cat $OVS_RUNDIR/$1.pid)
AT_CHECK(m4_if([$1],[ovs-vswitchd],
- [ovs-appctl -t $1 exit --cleanup],
- [ovs-appctl -t $1 exit]))
+ [ovs-appctl --timeout=10 -t $1 exit --cleanup],
+ [ovs-appctl --timeout=10 -t $1 exit]))
OVS_WAIT_WHILE([kill -0 $TMPPID 2>/dev/null])])
dnl OVS_APP_EXIT_AND_WAIT_BY_TARGET(TARGET, PIDFILE)
@@ -210,7 +210,7 @@ dnl argument), and then wait for it to exit.
m4_define([OVS_APP_EXIT_AND_WAIT_BY_TARGET],
[AT_CHECK([test -e $2])
TMPPID=$(cat $2)
- AT_CHECK([ovs-appctl --target=$1 exit])
+ AT_CHECK([ovs-appctl --timeout=10 --target=$1 exit])
OVS_WAIT_WHILE([kill -0 $TMPPID 2>/dev/null])])
dnl on_exit "COMMAND"
