summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorBen Pfaff <blp@ovn.org>2018-05-17 11:06:01 -0700
committerBen Pfaff <blp@ovn.org>2018-05-25 14:25:40 -0700
commit0f03ae3754ec8b30341befff81814fdc88cf0b88 (patch)
tree3a9bb2220c0a8721551bd3b12d727e0c4be97287 /tests
parentdff60a1e7173a9f1a27c37a8855b0975c9f8968e (diff)
downloadopenvswitch-0f03ae3754ec8b30341befff81814fdc88cf0b88.tar.gz
ovsdb: Improve timing in cluster torture test.
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 took, 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 <blp@ovn.org> Acked-by: Justin Pettit <jpettit@ovn.org>
Diffstat (limited to 'tests')
-rw-r--r--tests/ovsdb-cluster.at5
1 files changed, 2 insertions, 3 deletions
diff --git a/tests/ovsdb-cluster.at b/tests/ovsdb-cluster.at
index 456f4c102..b23adc6a5 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"