143fb14
From patchwork Tue Jul  3 18:32:18 2018
143fb14
Content-Type: text/plain; charset="utf-8"
143fb14
MIME-Version: 1.0
143fb14
Content-Transfer-Encoding: 7bit
143fb14
Subject: [ovs-dev] ofproto-macros: Ignore "Dropped # log messages" in
143fb14
 check_logs.
143fb14
X-Patchwork-Submitter: Ben Pfaff <blp@ovn.org>
143fb14
X-Patchwork-Id: 938851
143fb14
Message-Id: <20180703183218.32329-1-blp@ovn.org>
143fb14
To: dev@openvswitch.org
143fb14
Cc: Ben Pfaff <blp@ovn.org>
143fb14
Date: Tue,  3 Jul 2018 11:32:18 -0700
143fb14
From: Ben Pfaff <blp@ovn.org>
143fb14
List-Id: <ovs-dev.openvswitch.org>
143fb14
143fb14
check_logs ignores some log messages, but it wasn't smart enough to ignore
143fb14
the messages that said that the ignored messages had been rate-limited.
143fb14
This fixes the problem.
143fb14
143fb14
It's OK to ignore all rate-limiting messages because they only appear if at
143fb14
least one message was not rate-limited, which check_logs will catch anyway.
143fb14
143fb14
Reported-by: Timothy Redaelli <tredaelli@redhat.com>
143fb14
Reported-at: https://mail.openvswitch.org/pipermail/ovs-discuss/2018-July/046978.html
143fb14
Signed-off-by: Ben Pfaff <blp@ovn.org>
143fb14
Tested-By: Timothy Redaelli <tredaelli@redhat.com>
143fb14
---
143fb14
 tests/ofproto-macros.at | 6 ++++++
143fb14
 1 file changed, 6 insertions(+)
143fb14
143fb14
diff --git a/tests/ofproto-macros.at b/tests/ofproto-macros.at
143fb14
index 7388a20a2236..2a56ae6e2f3e 100644
143fb14
--- a/tests/ofproto-macros.at
143fb14
+++ b/tests/ofproto-macros.at
143fb14
@@ -400,6 +400,11 @@ check_logs () {
143fb14
     # all "connection reset" warning logs for similar reasons (either EPIPE or
143fb14
     # ECONNRESET can be returned on a send depending on whether the peer had
143fb14
     # unconsumed data when it closed the socket).
143fb14
+    #
143fb14
+    # We also ignore "Dropped # log messages..." messages.  Otherwise, even if
143fb14
+    # we ignore the messages that were rate-limited, we can end up failing just
143fb14
+    # because of the announcement that rate-limiting happened (and in a racy,
143fb14
+    # timing-dependent way, too).
143fb14
     sed -n "$1
143fb14
 /reset by peer/d
143fb14
 /Broken pipe/d
143fb14
@@ -408,6 +413,7 @@ check_logs () {
143fb14
 /timeval.*disk: [[0-9]]* reads, [[0-9]]* writes/d
143fb14
 /timeval.*context switches: [[0-9]]* voluntary, [[0-9]]* involuntary/d
143fb14
 /ovs_rcu.*blocked [[0-9]]* ms waiting for .* to quiesce/d
143fb14
+/Dropped [[0-9]]* log messages/d
143fb14
 /|WARN|/p
143fb14
 /|ERR|/p
143fb14
 /|EMER|/p" ${logs}