From patchwork Tue Jun 27 09:30:38 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Xavier Simonart X-Patchwork-Id: 1800501 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=openvswitch.org (client-ip=2605:bc80:3010::136; helo=smtp3.osuosl.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=NfKGrkHw; dkim-atps=neutral Received: from smtp3.osuosl.org (smtp3.osuosl.org [IPv6:2605:bc80:3010::136]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Qqzx84Dlxz242G for ; Tue, 27 Jun 2023 19:31:24 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id 407256141C; Tue, 27 Jun 2023 09:31:22 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org 407256141C Authentication-Results: smtp3.osuosl.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=NfKGrkHw X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp3.osuosl.org ([127.0.0.1]) by localhost (smtp3.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id RxaEVbZ36Era; Tue, 27 Jun 2023 09:31:20 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [IPv6:2605:bc80:3010:104::8cd3:938]) by smtp3.osuosl.org (Postfix) with ESMTPS id 858F361247; Tue, 27 Jun 2023 09:31:12 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org 858F361247 Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id 4A93CC0DEA; Tue, 27 Jun 2023 09:31:03 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@lists.linuxfoundation.org Received: from smtp2.osuosl.org (smtp2.osuosl.org [IPv6:2605:bc80:3010::133]) by lists.linuxfoundation.org (Postfix) with ESMTP id A2F2AC0DD5 for ; Tue, 27 Jun 2023 09:30:50 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp2.osuosl.org (Postfix) with ESMTP id 9FFF240236 for ; Tue, 27 Jun 2023 09:30:48 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org 9FFF240236 Authentication-Results: smtp2.osuosl.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=NfKGrkHw X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp2.osuosl.org ([127.0.0.1]) by localhost (smtp2.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id qkZO5khRTN1U for ; Tue, 27 Jun 2023 09:30:48 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.8.0 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org ED1E0404B5 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by smtp2.osuosl.org (Postfix) with ESMTPS id ED1E0404B5 for ; Tue, 27 Jun 2023 09:30:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1687858246; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=NAAMKyC+IDODB6hRUgxhZVK8nUBr7NsMd2Q/gEGlaPE=; b=NfKGrkHwjPR3EzZrZexPeLIJY1lqXOR8FlTlpHZuXKPPCSzO8tZkZehBBHUZcixpapQY0g oTMtQ6cnP8TCvepkTmwzuZu6s4g9Gz9swqXfifD4l4fP9+amw6SQf2Bw9QPICzGQkuibHf NZNeExTpaa3qG8pJiNimEioUt2YJiH0= Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-356-UXxfv1rSPTCwI8bmc_jJqw-1; Tue, 27 Jun 2023 05:30:44 -0400 X-MC-Unique: UXxfv1rSPTCwI8bmc_jJqw-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.rdu2.redhat.com [10.11.54.7]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id A383F1C0782F for ; Tue, 27 Jun 2023 09:30:44 +0000 (UTC) Received: from wsfd-netdev90.ntdv.lab.eng.bos.redhat.com (wsfd-netdev90.ntdv.lab.eng.bos.redhat.com [10.19.188.196]) by smtp.corp.redhat.com (Postfix) with ESMTP id 8C1F214682F7; Tue, 27 Jun 2023 09:30:44 +0000 (UTC) From: Xavier Simonart To: xsimonar@redhat.com, dev@openvswitch.org Date: Tue, 27 Jun 2023 11:30:38 +0200 Message-Id: <20230627093043.1465206-9-xsimonar@redhat.com> In-Reply-To: <20230627093043.1465206-1-xsimonar@redhat.com> References: <20230627093043.1465206-1-xsimonar@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.7 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Subject: [ovs-dev] [PATCH ovn 08/13] tests: fixed "check meters update" X-BeenThere: ovs-dev@openvswitch.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ovs-dev-bounces@openvswitch.org Sender: "dev" grep -q exit immediately with zero status if any match is found. Hence, when executing "ovs-ofctl dump-flows br-int | grep -q meter_id=1", ovs-ofctl might fail (with error "write to stdout failed") due to the broken pipe. Signed-off-by: Xavier Simonart --- tests/ovn.at | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/ovn.at b/tests/ovn.at index aed150563..9f6ba940b 100644 --- a/tests/ovn.at +++ b/tests/ovn.at @@ -33770,7 +33770,7 @@ ovn-nbctl --wait=hv ls-copp-add copp0 sw0 check ovn-nbctl --wait=hv sync AT_CHECK([as hv1 ovs-ofctl -OOpenFlow15 dump-meters br-int | grep -q rate=10], [0]) -AT_CHECK([as hv1 ovs-ofctl dump-flows br-int | grep -q meter_id=1], [0]) +AT_CHECK([as hv1 ovs-ofctl dump-flows br-int 2>&1 | grep -q meter_id=1], [0]) # Update existing meter check ovn-nbctl --may-exist meter-add meter0 drop 20 pktps @@ -33784,7 +33784,7 @@ check ovn-nbctl --log --severity=alert --meter=meter1 \ --name=dns acl-add sw0 to-lport 1000 'udp.dst == 53' drop check ovn-nbctl --wait=hv sync AT_CHECK([as hv1 ovs-ofctl -OOpenFlow15 dump-meters br-int | grep -q rate=30], [0]) -AT_CHECK([as hv1 ovs-ofctl dump-flows br-int | grep -q meter_id=2], [0]) +AT_CHECK([as hv1 ovs-ofctl dump-flows br-int 2>&1 | grep -q meter_id=2], [0]) # Remove meter0 check ovn-nbctl meter-del meter0 @@ -33802,7 +33802,7 @@ check ovn-nbctl --log --severity=alert --meter=meter2 \ check ovn-nbctl meter-add meter2 drop 100 pktps check ovn-nbctl --wait=hv sync AT_CHECK([as hv1 ovs-ofctl -OOpenFlow15 dump-meters br-int | grep -q rate=100], [0]) -AT_CHECK([as hv1 ovs-ofctl dump-flows br-int | grep -q meter_id=1], [0]) +AT_CHECK([as hv1 ovs-ofctl dump-flows br-int 2>&1 | grep -q meter_id=1], [0]) check ovn-nbctl meter-del meter2 check ovn-nbctl --wait=hv sync