diff mbox series

[ovs-dev,4/5] tests: Improve logging for async message control test.

Message ID 20191204230611.331596-4-blp@ovn.org
State Accepted
Commit 2235035119ed4220a6eb59f1614bf896c5c771c0
Headers show
Series [ovs-dev,1/5] ofp-print: Abbreviate lists of fields in table features output. | expand

Commit Message

Ben Pfaff Dec. 4, 2019, 11:06 p.m. UTC
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 <blp@ovn.org>
---
 tests/ofproto.at | 15 ++++++++++-----
 1 file changed, 10 insertions(+), 5 deletions(-)
diff mbox series

Patch

diff --git a/tests/ofproto.at b/tests/ofproto.at
index d5a13d0cf3b7..2e6f4cbfe74e 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])
 }