From 2e84aada0b45d2f8739c2fdbc351098fc1c09c26 Mon Sep 17 00:00:00 2001 Message-Id: <2e84aada0b45d2f8739c2fdbc351098fc1c09c26.1586727203.git.lorenzo.bianconi@redhat.com> From: Ilya Maximets Date: Wed, 6 Nov 2019 17:29:58 +0100 Subject: [PATCH 1/3] tests: Wait up to OVS_CTL_TIMEOUT seconds. 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 Acked-by: Aaron Conole Signed-off-by: William Tu Signed-off-by: Numan Siddique Signed-off-by: Lorenzo Bianconi --- tests/ovs-macros.at | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/ovs-macros.at b/tests/ovs-macros.at index b2e619f76..3dcf8f96d 100644 --- a/tests/ovs-macros.at +++ b/tests/ovs-macros.at @@ -208,9 +208,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 -- 2.25.2