From 2235035119ed4220a6eb59f1614bf896c5c771c0 Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Wed, 4 Dec 2019 15:06:10 -0800 Subject: tests: Improve logging for async message control test. The "ofproto - asynchronous message control (OpenFlow 1.4)" test fails from time to time when I'm running tests in parallel locally. So far, I've not been able to determine the root cause, but logging the difference between expected and actual output should help. Signed-off-by: Ben Pfaff Signed-off-by: William Tu --- tests/ofproto.at | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'tests/ofproto.at') diff --git a/tests/ofproto.at b/tests/ofproto.at index d5a13d0cf..2e6f4cbfe 100644 --- a/tests/ofproto.at +++ b/tests/ofproto.at @@ -3579,13 +3579,18 @@ table_desc:- AT_FAIL_IF([test X"$1" != X]) - OVS_WAIT_UNTIL([test `wc -l < "monitor.log"` -ge `wc -l < "expout"`]) + normalize_log () { + sed ' +s/ (xid=0x[[0-9a-fA-F]]*)// +s/ *duration.*// +s/00:0.$/00:0x/' < monitor.log + } + + OVS_WAIT_UNTIL([test `wc -l < "monitor.log"` -ge `wc -l < "expout"`], + [normalize_log | diff -u - expout]) AT_CHECK( - [[sed ' -s/ (xid=0x[0-9a-fA-F]*)// -s/ *duration.*// -s/00:0.$/00:0x/' < monitor.log]], + [normalize_log], [0], [expout]) } -- cgit v1.2.1