From patchwork Tue Jul 3 18:32:18 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ben Pfaff X-Patchwork-Id: 938851 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=openvswitch.org (client-ip=140.211.169.12; helo=mail.linuxfoundation.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=ovn.org Received: from mail.linuxfoundation.org (mail.linuxfoundation.org [140.211.169.12]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 41Kt5W3Fc2z9s3q for ; Wed, 4 Jul 2018 04:32:31 +1000 (AEST) Received: from mail.linux-foundation.org (localhost [127.0.0.1]) by mail.linuxfoundation.org (Postfix) with ESMTP id 4BEF3CC1; Tue, 3 Jul 2018 18:32:29 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@mail.linuxfoundation.org Received: from smtp1.linuxfoundation.org (smtp1.linux-foundation.org [172.17.192.35]) by mail.linuxfoundation.org (Postfix) with ESMTPS id 7ADE8CB5 for ; Tue, 3 Jul 2018 18:32:28 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from relay3-d.mail.gandi.net (relay3-d.mail.gandi.net [217.70.183.195]) by smtp1.linuxfoundation.org (Postfix) with ESMTPS id E2FF2691 for ; Tue, 3 Jul 2018 18:32:26 +0000 (UTC) X-Originating-IP: 208.91.3.26 Received: from sigabrt.benpfaff.org (unknown [208.91.3.26]) (Authenticated sender: blp@ovn.org) by relay3-d.mail.gandi.net (Postfix) with ESMTPSA id 4242060016; Tue, 3 Jul 2018 18:32:22 +0000 (UTC) From: Ben Pfaff To: dev@openvswitch.org Date: Tue, 3 Jul 2018 11:32:18 -0700 Message-Id: <20180703183218.32329-1-blp@ovn.org> X-Mailer: git-send-email 2.16.1 X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on smtp1.linux-foundation.org Cc: Ben Pfaff Subject: [ovs-dev] [PATCH] ofproto-macros: Ignore "Dropped # log messages" in check_logs. X-BeenThere: ovs-dev@openvswitch.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: ovs-dev-bounces@openvswitch.org Errors-To: ovs-dev-bounces@openvswitch.org check_logs ignores some log messages, but it wasn't smart enough to ignore the messages that said that the ignored messages had been rate-limited. This fixes the problem. It's OK to ignore all rate-limiting messages because they only appear if at least one message was not rate-limited, which check_logs will catch anyway. Reported-by: Timothy Redaelli Reported-at: https://mail.openvswitch.org/pipermail/ovs-discuss/2018-July/046978.html Signed-off-by: Ben Pfaff Tested-By: Timothy Redaelli --- tests/ofproto-macros.at | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests/ofproto-macros.at b/tests/ofproto-macros.at index 7388a20a2236..2a56ae6e2f3e 100644 --- a/tests/ofproto-macros.at +++ b/tests/ofproto-macros.at @@ -400,6 +400,11 @@ check_logs () { # all "connection reset" warning logs for similar reasons (either EPIPE or # ECONNRESET can be returned on a send depending on whether the peer had # unconsumed data when it closed the socket). + # + # We also ignore "Dropped # log messages..." messages. Otherwise, even if + # we ignore the messages that were rate-limited, we can end up failing just + # because of the announcement that rate-limiting happened (and in a racy, + # timing-dependent way, too). sed -n "$1 /reset by peer/d /Broken pipe/d @@ -408,6 +413,7 @@ check_logs () { /timeval.*disk: [[0-9]]* reads, [[0-9]]* writes/d /timeval.*context switches: [[0-9]]* voluntary, [[0-9]]* involuntary/d /ovs_rcu.*blocked [[0-9]]* ms waiting for .* to quiesce/d +/Dropped [[0-9]]* log messages/d /|WARN|/p /|ERR|/p /|EMER|/p" ${logs}