Skip to content

Commit

Permalink
tests: Wait up to OVS_CTL_TIMEOUT seconds.
Browse files Browse the repository at this point in the history
While running tests under valgrind, it could take more than 10 seconds
for process to disappear after successful 'ovs-appctl exit' command.

Same applies to some other events that tests are waiting for with
OVS_WAIT macro.  This makes tests to fail frequently under valgrind.

Using OVS_CTL_TIMEOUT variable instead of constant 10 seconds seems
reasonable to avoid this issue because it controls timeouts of all
control utilities and needs to be adjusted while running under valgrind
anyway.

Signed-off-by: Ilya Maximets <i.maximets@ovn.org>
Acked-by: Aaron Conole <aconole@redhat.com>
Signed-off-by: William Tu <u9012063@gmail.com>
  • Loading branch information
igsilya authored and williamtu committed Nov 6, 2019
1 parent 485c76d commit 0c489cc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/ovs-macros.at
Expand Up @@ -229,9 +229,9 @@ ovs_wait () {
sleep 0.1
if ovs_wait_cond; then echo "$1: wait succeeded quickly" >&AS_MESSAGE_LOG_FD; return 0; fi

# Then wait up to 10 seconds.
# Then wait up to OVS_CTL_TIMEOUT seconds.
local d
for d in 1 2 3 4 5 6 7 8 9 10; do
for d in `seq 1 "$OVS_CTL_TIMEOUT"`; do
sleep 1
if ovs_wait_cond; then echo "$1: wait succeeded after $d seconds" >&AS_MESSAGE_LOG_FD; return 0; fi
done
Expand Down

0 comments on commit 0c489cc

Please sign in to comment.