Until now the timing in the cluster torture test has been pretty
inaccurate because it just worked by calling "sleep 1" in a loop that
did other things.  The longer those other things too, the more inaccurate
it got.

This commit changes to using a separate process for timing.  It still won't
be all that accurate but at least the timing loop doesn't try to do
anything else.

(I'm not sure how to actually get accurate timing in shell.)

Signed-off-by: Ben Pfaff <b...@ovn.org>
---
 tests/ovsdb-cluster.at | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/tests/ovsdb-cluster.at b/tests/ovsdb-cluster.at
index cc66228c6265..755fa2dc8bbf 100644
--- a/tests/ovsdb-cluster.at
+++ b/tests/ovsdb-cluster.at
@@ -149,9 +149,9 @@ ovsdb|WARN|schema: changed 2 columns in 'OVN_Southbound' 
database from ephemeral
     sleep 2
 
     echo "waiting for ovn-sbctl processes to exit..."
-    i=0
     phase=0
-    while :; do
+    i=0
+    (while :; do echo; sleep 1; done) | while read; do
         printf "t=%2d s:" $i
        done=0
         for j in $(seq 0 $(expr $n1 - 1)); do
@@ -190,7 +190,6 @@ ovsdb|WARN|schema: changed 2 columns in 'OVN_Southbound' 
database from ephemeral
            ;;
        esac
 
-        sleep 1
        i=$(expr $i + 1)
     done
     echo "...done"
-- 
2.16.1

_______________________________________________
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to