From patchwork Mon Sep 18 16:47:00 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Xavier Simonart X-Patchwork-Id: 1836335 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org 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=FxIjWEGC; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=openvswitch.org (client-ip=2605:bc80:3010::138; helo=smtp1.osuosl.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=patchwork.ozlabs.org) Received: from smtp1.osuosl.org (smtp1.osuosl.org [IPv6:2605:bc80:3010::138]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Rq9hh0X6hz1ynr for ; Tue, 19 Sep 2023 02:48:03 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id 6448F82281; Mon, 18 Sep 2023 16:48:01 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org 6448F82281 Authentication-Results: smtp1.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=FxIjWEGC X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp1.osuosl.org ([127.0.0.1]) by localhost (smtp1.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 1_JdTQPDKI59; Mon, 18 Sep 2023 16:47:59 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [IPv6:2605:bc80:3010:104::8cd3:938]) by smtp1.osuosl.org (Postfix) with ESMTPS id 0661F82210; Mon, 18 Sep 2023 16:47:56 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org 0661F82210 Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id 64907C0DD9; Mon, 18 Sep 2023 16:47:51 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@lists.linuxfoundation.org Received: from smtp3.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by lists.linuxfoundation.org (Postfix) with ESMTP id 23A86C0DDE for ; Mon, 18 Sep 2023 16:47:45 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id 31F9C6150C for ; Mon, 18 Sep 2023 16:47:20 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org 31F9C6150C Authentication-Results: smtp3.osuosl.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=FxIjWEGC 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 iN0myXxUfQPA for ; Mon, 18 Sep 2023 16:47:19 +0000 (UTC) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by smtp3.osuosl.org (Postfix) with ESMTPS id 38E49611F3 for ; Mon, 18 Sep 2023 16:47:19 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org 38E49611F3 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1695055638; 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=d14Xw+d5LUpG+nqzakTCj6QYMAqg5LbesPLu+OJyugk=; b=FxIjWEGCPx6m7KkNce0tXIzTmyTopea8l+CJg5/v54fSHhpJ0WA9d8rk947TWLexXAHYsl fUAt94Mvt+61triSS7no5oIoi8E8VC+72ieATQpvxa7c9qAoO7ipAvN7cA4tl+Ud2DENjM uFXF8NXdjHdw51XvJo+rHYTblmO4TQ0= Received: from mimecast-mx02.redhat.com (mx-ext.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-428-zXzTzLtTO-yNk-ZraiDWWQ-1; Mon, 18 Sep 2023 12:47:16 -0400 X-MC-Unique: zXzTzLtTO-yNk-ZraiDWWQ-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.rdu2.redhat.com [10.11.54.8]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 7027B1C03336 for ; Mon, 18 Sep 2023 16:47:14 +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 5873DC15BB8; Mon, 18 Sep 2023 16:47:14 +0000 (UTC) From: Xavier Simonart To: xsimonar@redhat.com, dev@openvswitch.org Date: Mon, 18 Sep 2023 18:47:00 +0200 Message-Id: <20230918164714.3144984-2-xsimonar@redhat.com> In-Reply-To: <20230918164714.3144984-1-xsimonar@redhat.com> References: <20230918164714.3144984-1-xsimonar@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.8 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Subject: [ovs-dev] [PATCH ovn 01/15] tests: fixed multiple ovn-ic tests 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" Multiple ovn-ic tests change routes in az1 and check whether the routes are properly updated in az2. Some of those tests add some ovn-nbctl --wait=sb sync in az2. However, if ovn-ic processes are slow for whatever reasons, such tests might have failed. Signed-off-by: Xavier Simonart --- tests/ovn-ic.at | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/tests/ovn-ic.at b/tests/ovn-ic.at index d265bb90b..2ae8dd12d 100644 --- a/tests/ovn-ic.at +++ b/tests/ovn-ic.at @@ -335,8 +335,9 @@ ovn-nbctl lsp-add ts1 lsp-ts1-lr1 ovn-nbctl lsp-set-addresses lsp-ts1-lr1 router ovn-nbctl lsp-set-type lsp-ts1-lr1 router ovn-nbctl --wait=hv lsp-set-options lsp-ts1-lr1 router-port=lrp-lr1-ts1 - ovn_as az2 ovn-nbctl lsp-set-options lsp-ts1-lr1 requested-chassis=gw1 + +OVS_WAIT_UNTIL([ovn_as az2 ovn-nbctl show | grep "aa:aa:aa:aa:aa:01 169.254.100.1/24"]) AT_CHECK([ovn_as az2 ovn-nbctl show | uuidfilt], [0], [dnl switch <0> (ts1) port lsp-ts1-lr1 @@ -552,6 +553,9 @@ ovn_as az1 ovn-nbctl show echo az2 ovn_as az2 ovn-nbctl show +OVS_WAIT_UNTIL([ovn_as az1 ovn-nbctl lr-route-list lr11 | grep learned | grep 192.168]) +OVS_WAIT_UNTIL([ovn_as az1 ovn-nbctl lr-route-list lr11 | grep learned | grep 10.10.10]) + # Test routes from lr12 were learned to lr11 AT_CHECK([ovn_as az1 ovn-nbctl lr-route-list lr11 | grep learned | awk '{print $1, $2}' | sort], [0], [dnl @@ -1083,6 +1087,7 @@ ovn_as az2 ovn-nbctl --route-table=rtb3 lr-route-add lr12 2001:db8:aaaa::/64 200 ovn_as az2 ovn-nbctl --wait=sb lrp-add lr22 lrp-lr22 aa:aa:aa:aa:bb:01 "2001:db8:200::1/64" # Test direct routes from lr12 were learned to lr11 +OVS_WAIT_UNTIL([ovn_as az1 ovn-nbctl lr-route-list lr11 | grep 2001:db8:3::2]) AT_CHECK([ovn_as az1 ovn-nbctl lr-route-list lr11 | grep 2001:db8:200 | grep learned | awk '{print $1, $2, $5}' | sort], [0], [dnl 2001:db8:200::/64 2001:db8:1::2 ecmp @@ -1091,16 +1096,19 @@ AT_CHECK([ovn_as az1 ovn-nbctl lr-route-list lr11 | grep 2001:db8:200 | ]) # Test static routes from lr12 rtbs rtb1,rtb2,rtb3 were learned to lr11 +OVS_WAIT_UNTIL([ovn_as az1 ovn-nbctl --route-table=rtb1 lr-route-list lr11 | grep learned]) AT_CHECK([ovn_as az1 ovn-nbctl --route-table=rtb1 lr-route-list lr11], [0], [dnl IPv6 Routes Route Table rtb1: 2001:db8:aaaa::/64 2001:db8:1::2 dst-ip (learned) ]) +OVS_WAIT_UNTIL([ovn_as az1 ovn-nbctl --route-table=rtb2 lr-route-list lr11 | grep learned]) AT_CHECK([ovn_as az1 ovn-nbctl --route-table=rtb2 lr-route-list lr11], [0], [dnl IPv6 Routes Route Table rtb2: 2001:db8:aaaa::/64 2001:db8:2::2 dst-ip (learned) ]) +OVS_WAIT_UNTIL([ovn_as az1 ovn-nbctl --route-table=rtb3 lr-route-list lr11 | grep learned]) AT_CHECK([ovn_as az1 ovn-nbctl --route-table=rtb3 lr-route-list lr11], [0], [dnl IPv6 Routes Route Table rtb3: @@ -1152,12 +1160,16 @@ for i in 1 2; do check ovn-nbctl --wait=sb lr-route-add $lr 0.0.0.0/0 192.168.$i.11 done +OVS_WAIT_UNTIL([ovn_as az1 ovn-nbctl lr-route-list lr11 | grep learned]) + AT_CHECK([ovn_as az1 ovn-nbctl lr-route-list lr11 | grep dst-ip | sort], [0], [dnl 0.0.0.0/0 192.168.1.11 dst-ip 10.0.0.0/24 192.168.1.10 dst-ip 192.168.2.0/24 169.254.100.2 dst-ip (learned) ]) +OVS_WAIT_UNTIL([ovn_as az2 ovn-nbctl lr-route-list lr12 | grep learned]) + AT_CHECK([ovn_as az2 ovn-nbctl lr-route-list lr12 | grep dst-ip | sort], [0], [dnl 0.0.0.0/0 192.168.2.11 dst-ip 10.0.0.0/24 192.168.2.10 dst-ip From patchwork Mon Sep 18 16:47:01 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Xavier Simonart X-Patchwork-Id: 1836337 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org 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=HqN/S830; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=openvswitch.org (client-ip=140.211.166.138; helo=smtp1.osuosl.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=patchwork.ozlabs.org) Received: from smtp1.osuosl.org (smtp1.osuosl.org [140.211.166.138]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Rq9hq4sG2z1ync for ; Tue, 19 Sep 2023 02:48:11 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id E1964821D7; Mon, 18 Sep 2023 16:48:08 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org E1964821D7 Authentication-Results: smtp1.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=HqN/S830 X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp1.osuosl.org ([127.0.0.1]) by localhost (smtp1.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id QM7gOevZjL5O; Mon, 18 Sep 2023 16:48:05 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [IPv6:2605:bc80:3010:104::8cd3:938]) by smtp1.osuosl.org (Postfix) with ESMTPS id D1AF382258; Mon, 18 Sep 2023 16:47:59 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org D1AF382258 Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id BF4DDC0DE8; Mon, 18 Sep 2023 16:47:52 +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 37703C0DD7 for ; Mon, 18 Sep 2023 16:47:47 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp2.osuosl.org (Postfix) with ESMTP id 3D61D416C6 for ; Mon, 18 Sep 2023 16:47:27 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org 3D61D416C6 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=HqN/S830 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 MX0yJ8_Wsoof for ; Mon, 18 Sep 2023 16:47:26 +0000 (UTC) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by smtp2.osuosl.org (Postfix) with ESMTPS id 539B8416A4 for ; Mon, 18 Sep 2023 16:47:18 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org 539B8416A4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1695055637; 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=PyR/0k8BNyoZE0xkLrJKMyciiD5/3tnjC5zHpvGHjnc=; b=HqN/S830RWAn4rVVZcMH5xH7IXg4ElrOlfABths1gILqDUH5LPORlO2kMzF4FcSCqLcgWm ZlpIjMbN7InmRkXAgy9eugXZU/MKI3OXCUoRelH/PepWe99j87ACJ1QHgLBjBzuMoFZ6U2 rzv0f9D0CT3QxjrTrxNVm7GXJW41INw= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-247-L1eBeYrnMqGYjCg3_AzMuw-1; Mon, 18 Sep 2023 12:47:14 -0400 X-MC-Unique: L1eBeYrnMqGYjCg3_AzMuw-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.rdu2.redhat.com [10.11.54.8]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 8FEDC803470 for ; Mon, 18 Sep 2023 16:47:14 +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 76CD6C03292; Mon, 18 Sep 2023 16:47:14 +0000 (UTC) From: Xavier Simonart To: xsimonar@redhat.com, dev@openvswitch.org Date: Mon, 18 Sep 2023 18:47:01 +0200 Message-Id: <20230918164714.3144984-3-xsimonar@redhat.com> In-Reply-To: <20230918164714.3144984-1-xsimonar@redhat.com> References: <20230918164714.3144984-1-xsimonar@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.8 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Subject: [ovs-dev] [PATCH ovn 02/15] tests: fixed "Logical router policy packet marking" 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" The test was sometimes failing if an arp packet was received after installing priority=0 flow, and before installing the flow matching arp. Signed-off-by: Xavier Simonart --- tests/ovn.at | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/ovn.at b/tests/ovn.at index ba5ce298a..6aabe985b 100644 --- a/tests/ovn.at +++ b/tests/ovn.at @@ -28137,9 +28137,10 @@ OVS_WAIT_UNTIL([ ]) as hv1 check ovs-ofctl del-flows br-phys + AT_DATA([flows.txt], [dnl -table=0, priority=0 actions=NORMAL table=0, priority=200 arp,actions=drop +table=0, priority=0 actions=NORMAL table=0, priority=100, pkt_mark=0x64 actions=drop table=0, priority=100, pkt_mark=0x2 actions=drop table=0, priority=100, pkt_mark=0x3 actions=drop From patchwork Mon Sep 18 16:47:02 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Xavier Simonart X-Patchwork-Id: 1836341 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org 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=eKu9IvJB; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=openvswitch.org (client-ip=2605:bc80:3010::133; helo=smtp2.osuosl.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=patchwork.ozlabs.org) Received: from smtp2.osuosl.org (smtp2.osuosl.org [IPv6:2605:bc80:3010::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Rq9jB45qzz1ync for ; Tue, 19 Sep 2023 02:48:30 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by smtp2.osuosl.org (Postfix) with ESMTP id 36A3B41989; Mon, 18 Sep 2023 16:48:27 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org 36A3B41989 Authentication-Results: smtp2.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=eKu9IvJB 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 nb1TmH8kifaZ; Mon, 18 Sep 2023 16:48:25 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by smtp2.osuosl.org (Postfix) with ESMTPS id ACB3941665; Mon, 18 Sep 2023 16:48:08 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org ACB3941665 Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id 90F18C0DF4; Mon, 18 Sep 2023 16:47:56 +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 16E7BC0DE3 for ; Mon, 18 Sep 2023 16:47:50 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp2.osuosl.org (Postfix) with ESMTP id 1C9AF41722 for ; Mon, 18 Sep 2023 16:47:28 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org 1C9AF41722 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 wNmo-JhLhOov for ; Mon, 18 Sep 2023 16:47:26 +0000 (UTC) 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 6D25D41692 for ; Mon, 18 Sep 2023 16:47:19 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org 6D25D41692 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1695055638; 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=6MwbtX71uuvSCAmZ3nfU4XHdJ23DkqZptIbVCnUVUV8=; b=eKu9IvJBgG4yKZifKOREJnfQ1f6zwutbGYrxBuDFFVfczfACXQRvE5PQmn784US/f/ZLVe EZDfRwMVIRi8W+IU+7iB7bcgNF0/JHVXlOSYbMAh9OWFv+/2WzZMu6WryrU+GhQrf58g72 XyvhRyrkgoBF4SfVF/KdG0ZObK+FobQ= Received: from mimecast-mx02.redhat.com (mx-ext.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-302-374pKROJM2elxSleE_RkrA-1; Mon, 18 Sep 2023 12:47:16 -0400 X-MC-Unique: 374pKROJM2elxSleE_RkrA-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.rdu2.redhat.com [10.11.54.8]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id AE62D29A9D25 for ; Mon, 18 Sep 2023 16:47:14 +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 9679AC15BB8; Mon, 18 Sep 2023 16:47:14 +0000 (UTC) From: Xavier Simonart To: xsimonar@redhat.com, dev@openvswitch.org Date: Mon, 18 Sep 2023 18:47:02 +0200 Message-Id: <20230918164714.3144984-4-xsimonar@redhat.com> In-Reply-To: <20230918164714.3144984-1-xsimonar@redhat.com> References: <20230918164714.3144984-1-xsimonar@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.8 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Subject: [ovs-dev] [PATCH ovn 03/15] tests: fixed "options:requested-chassis for logical port" 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" The test was checking if a lport was properly released, but in some race condition the logging message is slighly different. Signed-off-by: Xavier Simonart --- tests/ovn.at | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/ovn.at b/tests/ovn.at index 6aabe985b..9f35aef2b 100644 --- a/tests/ovn.at +++ b/tests/ovn.at @@ -16188,7 +16188,7 @@ echo "verifying that lsp0 binding moves when requested-chassis is changed" ovn-nbctl lsp-set-options lsp0 requested-chassis=hv2 # We might see multiple "Releasing lport ...", when sb is read only -OVS_WAIT_UNTIL([test 1 -le $(grep -c "Releasing lport lsp0 from this chassis" hv1/ovn-controller.log)]) +OVS_WAIT_UNTIL([test 1 -le $(grep -c "Releasing lport lsp0" hv1/ovn-controller.log)]) wait_column "$hv2_uuid" Port_Binding chassis logical_port=lsp0 @@ -16276,7 +16276,7 @@ AT_CHECK([as hv1 ovs-ofctl dump-flows br-int table=0 | grep in_port=1], [0], [ig AT_CHECK([as hv1 ovs-ofctl dump-flows br-int table=65 | grep actions=output:1], [0], [ignore]) check ovn-nbctl --wait=hv lsp-set-options lsp0 requested-chassis=non-existant-chassis -OVS_WAIT_UNTIL([test 1 -le $(grep -c "Releasing lport lsp0 from this chassis" hv1/ovn-controller.log)]) +OVS_WAIT_UNTIL([test 1 -le $(grep -c "Releasing lport lsp0" hv1/ovn-controller.log)]) check ovn-nbctl --wait=hv sync wait_column '' Port_Binding chasssi logical_port=lsp0 AT_CHECK([as hv1 ovs-ofctl dump-flows br-int table=0 | grep in_port=1], [1], []) From patchwork Mon Sep 18 16:47:03 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Xavier Simonart X-Patchwork-Id: 1836329 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org 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=NhIR8BDE; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=openvswitch.org (client-ip=140.211.166.136; helo=smtp3.osuosl.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=patchwork.ozlabs.org) Received: from smtp3.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Rq9hP08YGz1ync for ; Tue, 19 Sep 2023 02:47:48 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id E0AE061559; Mon, 18 Sep 2023 16:47:46 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org E0AE061559 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=NhIR8BDE 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 tyUbRdaVUWo8; Mon, 18 Sep 2023 16:47:45 +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 BE6A46153D; Mon, 18 Sep 2023 16:47:44 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org BE6A46153D Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id 966DDC0DD3; Mon, 18 Sep 2023 16:47:43 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@lists.linuxfoundation.org Received: from smtp3.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by lists.linuxfoundation.org (Postfix) with ESMTP id 17E11C0DD3 for ; Mon, 18 Sep 2023 16:47:42 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id A97A561551 for ; Mon, 18 Sep 2023 16:47:18 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org A97A561551 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 uMrWzyOYBxnO for ; Mon, 18 Sep 2023 16:47:17 +0000 (UTC) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by smtp3.osuosl.org (Postfix) with ESMTPS id 712B56154B for ; Mon, 18 Sep 2023 16:47:17 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org 712B56154B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1695055636; 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=fbHqs3ksGBArXmye32hkAGxKsYLwR16rvxzMMSfpSL0=; b=NhIR8BDE9KTfipuBdwaT9vRnJ64mNAXuAnY7FGJ1z5gHCDF7q/tF386t0njADWWpcwLVX3 J9uYOWAk6NxSkPQrSOpe1RCcRoyIoRo5NA/B+tueEZJq3/pCFGXZFvJK6hB9/thvr0B/NL YsGPm1Eh648pIKvxGZps3uZOkkuP7IQ= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-281-pAKhLidhNESh3F6Ym6uBew-1; Mon, 18 Sep 2023 12:47:15 -0400 X-MC-Unique: pAKhLidhNESh3F6Ym6uBew-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.rdu2.redhat.com [10.11.54.8]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id CD67D185A797 for ; Mon, 18 Sep 2023 16:47:14 +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 B4B9EC15BB8; Mon, 18 Sep 2023 16:47:14 +0000 (UTC) From: Xavier Simonart To: xsimonar@redhat.com, dev@openvswitch.org Date: Mon, 18 Sep 2023 18:47:03 +0200 Message-Id: <20230918164714.3144984-5-xsimonar@redhat.com> In-Reply-To: <20230918164714.3144984-1-xsimonar@redhat.com> References: <20230918164714.3144984-1-xsimonar@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.8 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Subject: [ovs-dev] [PATCH ovn 04/15] tests: tests fixed "Encaps tunnel cleanup ..." and "ovn-controller exit" 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" Both tests were randomly failing as not properly checking that ovn-controller really exited. Fixes: 4caf8da7e81b ("tests: fixed "Encaps tunnel cleanup does not interfere with multiple controller on the same host"") Signed-off-by: Xavier Simonart --- tests/ovn.at | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tests/ovn.at b/tests/ovn.at index 9f35aef2b..3c4d266c5 100644 --- a/tests/ovn.at +++ b/tests/ovn.at @@ -19495,6 +19495,9 @@ OVN_CHECK_PACKETS([hv2/vif1-tx.pcap], [expected]) # Stop ovn-controller on hv2 as hv2 ovs-appctl -t ovn-controller exit +# Make sure it's really stopped, as we will restart it later. +OVS_WAIT_WHILE([kill -0 $(cat hv2/ovn-controller.pid) 2> /dev/null]) + # Now send the packet again. This time, it should not arrive. OVS_WAIT_UNTIL([as hv1 ovs-appctl -t ovn-controller inject-pkt "$packet"]) @@ -36263,7 +36266,9 @@ rm -f ${OVN_SYSCONFDIR}/system-id-override check ovn-appctl -t ovn-controller exit --restart # Make sure ovn-controller stopped before restarting it -OVS_WAIT_UNTIL([test x$(ovn-appctl -t ovn-controller debug/status) != "xrunning"]) +# Checking the debug/status would not be not enough as the unixctl might be closed +# but ovn-controller still finishing up cleaning. +OVS_WAIT_WHILE([kill -0 $(cat hv1/ovn-controller.pid) 2> /dev/null]) # for some reason SSL ovsdb configuration overrides CLI, so # delete ssl config from ovsdb to give CLI arguments priority From patchwork Mon Sep 18 16:47:04 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Xavier Simonart X-Patchwork-Id: 1836331 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org 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=eJPsOmYZ; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=openvswitch.org (client-ip=2605:bc80:3010::133; helo=smtp2.osuosl.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=patchwork.ozlabs.org) Received: from smtp2.osuosl.org (smtp2.osuosl.org [IPv6:2605:bc80:3010::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Rq9hV25pHz1ync for ; Tue, 19 Sep 2023 02:47:54 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by smtp2.osuosl.org (Postfix) with ESMTP id 001A74175D; Mon, 18 Sep 2023 16:47:48 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org 001A74175D Authentication-Results: smtp2.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=eJPsOmYZ 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 3Jcn8jDjyUDx; Mon, 18 Sep 2023 16:47:47 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [IPv6:2605:bc80:3010:104::8cd3:938]) by smtp2.osuosl.org (Postfix) with ESMTPS id 1DF16415BA; Mon, 18 Sep 2023 16:47:46 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org 1DF16415BA Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id 6726CC0DDC; Mon, 18 Sep 2023 16:47:44 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@lists.linuxfoundation.org Received: from smtp4.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by lists.linuxfoundation.org (Postfix) with ESMTP id 34708C0DD6 for ; Mon, 18 Sep 2023 16:47:42 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id 22E3141B23 for ; Mon, 18 Sep 2023 16:47:19 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org 22E3141B23 Authentication-Results: smtp4.osuosl.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=eJPsOmYZ X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp4.osuosl.org ([127.0.0.1]) by localhost (smtp4.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 2ohBPmxuNn1h for ; Mon, 18 Sep 2023 16:47:18 +0000 (UTC) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by smtp4.osuosl.org (Postfix) with ESMTPS id 9B03E41ADE for ; Mon, 18 Sep 2023 16:47:17 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org 9B03E41ADE DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1695055636; 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=YVd2/1WByWJIGH9OAIlWx6SczQmlfUcotwg+z8//yH4=; b=eJPsOmYZiLqWyG/Chgos/izqtTHr7Mx0/uD/xOGA6zTkIIh8+XBPkH8TJtH9uv1TmhRMXN wluVuaP8TyLsR0j31EuE3yzLyPE/M8KMY0O3quTPDh4bwjl36In8wh+OLi7p812c72fJlc STc/Zh4fhEPf2svMrvzcIOeIDd8Qfms= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-93-qfvuhnn1MNW97CNwvMFGOw-1; Mon, 18 Sep 2023 12:47:15 -0400 X-MC-Unique: qfvuhnn1MNW97CNwvMFGOw-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.rdu2.redhat.com [10.11.54.8]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id EB994858F1B for ; Mon, 18 Sep 2023 16:47:14 +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 D2F68C15BB8; Mon, 18 Sep 2023 16:47:14 +0000 (UTC) From: Xavier Simonart To: xsimonar@redhat.com, dev@openvswitch.org Date: Mon, 18 Sep 2023 18:47:04 +0200 Message-Id: <20230918164714.3144984-6-xsimonar@redhat.com> In-Reply-To: <20230918164714.3144984-1-xsimonar@redhat.com> References: <20230918164714.3144984-1-xsimonar@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.8 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Subject: [ovs-dev] [PATCH ovn 05/15] tests: wait for all flows to be installed before sending packets 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" Remote output flows are setup when binding of remote port is received. Hence those flows can be setup after ports have been reported up. - 3 HVs, 1 VIFs/HV, 1 software GW, 1 LS - 3 HVs, 3 LS, 3 lports/LS, 1 LR - 2 HVs, 2 LRs connected via LS, gateway router Signed-off-by: Xavier Simonart --- tests/ovn.at | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/tests/ovn.at b/tests/ovn.at index 3c4d266c5..927c505df 100644 --- a/tests/ovn.at +++ b/tests/ovn.at @@ -4650,6 +4650,12 @@ OVN_POPULATE_ARP wait_for_ports_up check ovn-nbctl --wait=hv sync +OVN_WAIT_REMOTE_OUTPUT_FLOWS(["hv1"],["hv2"]) +OVN_WAIT_REMOTE_OUTPUT_FLOWS(["hv2"],["hv1"]) +OVN_WAIT_REMOTE_OUTPUT_FLOWS(["hv1"],["hv_gw"]) +OVN_WAIT_REMOTE_OUTPUT_FLOWS(["hv_gw"],["hv1"]) +OVN_WAIT_REMOTE_OUTPUT_FLOWS(["hv2"],["hv_gw"]) +OVN_WAIT_REMOTE_OUTPUT_FLOWS(["hv_gw"],["hv2"]) # test_packet INPORT DST SRC ETHTYPE OUTPORT... # @@ -4849,6 +4855,13 @@ check ovn-nbctl --wait=hv sync # for ARP resolution). OVN_POPULATE_ARP +OVN_WAIT_REMOTE_OUTPUT_FLOWS(["hv1"],["hv2"]) +OVN_WAIT_REMOTE_OUTPUT_FLOWS(["hv2"],["hv1"]) +OVN_WAIT_REMOTE_OUTPUT_FLOWS(["hv2"],["hv3"]) +OVN_WAIT_REMOTE_OUTPUT_FLOWS(["hv3"],["hv2"]) +OVN_WAIT_REMOTE_OUTPUT_FLOWS(["hv1"],["hv3"]) +OVN_WAIT_REMOTE_OUTPUT_FLOWS(["hv3"],["hv1"]) + # test_ip INPORT SRC_MAC DST_MAC SRC_IP DST_IP OUTPORT... # # This shell function causes a packet to be received on INPORT. The packet's @@ -7645,6 +7658,9 @@ ovn-nbctl lsp-add alice alice1 \ wait_for_ports_up check ovn-nbctl --wait=hv sync +OVN_WAIT_REMOTE_OUTPUT_FLOWS(["hv1"],["hv2"]) +OVN_WAIT_REMOTE_OUTPUT_FLOWS(["hv2"],["hv1"]) + # Send ip packets between foo1 and alice1 src_mac="f00000010203" dst_mac="000001010203" From patchwork Mon Sep 18 16:47:05 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Xavier Simonart X-Patchwork-Id: 1836343 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org 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=g1DJupxb; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=openvswitch.org (client-ip=2605:bc80:3010::133; helo=smtp2.osuosl.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=patchwork.ozlabs.org) Received: from smtp2.osuosl.org (smtp2.osuosl.org [IPv6:2605:bc80:3010::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Rq9jW0RPQz1ync for ; Tue, 19 Sep 2023 02:48:47 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by smtp2.osuosl.org (Postfix) with ESMTP id 0CE0E41A00; Mon, 18 Sep 2023 16:48:45 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org 0CE0E41A00 Authentication-Results: smtp2.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=g1DJupxb 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 AA4_qb85w0Io; Mon, 18 Sep 2023 16:48:38 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [IPv6:2605:bc80:3010:104::8cd3:938]) by smtp2.osuosl.org (Postfix) with ESMTPS id 86AA941A09; Mon, 18 Sep 2023 16:48:13 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org 86AA941A09 Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id 78DA0C0DFE; Mon, 18 Sep 2023 16:47:58 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@lists.linuxfoundation.org Received: from smtp1.osuosl.org (smtp1.osuosl.org [IPv6:2605:bc80:3010::138]) by lists.linuxfoundation.org (Postfix) with ESMTP id 0EED3C0DF8 for ; Mon, 18 Sep 2023 16:47:57 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id 3B87181E3A for ; Mon, 18 Sep 2023 16:47:25 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org 3B87181E3A Authentication-Results: smtp1.osuosl.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=g1DJupxb X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp1.osuosl.org ([127.0.0.1]) by localhost (smtp1.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id NE-h_fhbz1Ue for ; Mon, 18 Sep 2023 16:47:21 +0000 (UTC) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by smtp1.osuosl.org (Postfix) with ESMTPS id 7C0F582132 for ; Mon, 18 Sep 2023 16:47:19 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org 7C0F582132 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1695055637; 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=DRgAD2kh/kZfCaPEMRvc5b1KRpcO30kJjyUArMC/MiM=; b=g1DJupxbVj1kChK6pOdbPNutazO0RuHFwSFMpZY8VYnEiAvkEoAUvR1tJO8v6mjU2ODzLW oXQjBfJyLtyYyk36Wzy1O7lI164ksU4gdLkxGsUsfcVPcbIDJo6SiEGm6I0mKZQ+Nym6j2 tH+vItunqBc0cgKKComw8vn3SqyE8n8= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-315-d5m5WUkCOFuaiYr0DPZkow-1; Mon, 18 Sep 2023 12:47:16 -0400 X-MC-Unique: d5m5WUkCOFuaiYr0DPZkow-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.rdu2.redhat.com [10.11.54.8]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 18BED858281 for ; Mon, 18 Sep 2023 16:47:15 +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 F2811C15BB8; Mon, 18 Sep 2023 16:47:14 +0000 (UTC) From: Xavier Simonart To: xsimonar@redhat.com, dev@openvswitch.org Date: Mon, 18 Sep 2023 18:47:05 +0200 Message-Id: <20230918164714.3144984-7-xsimonar@redhat.com> In-Reply-To: <20230918164714.3144984-1-xsimonar@redhat.com> References: <20230918164714.3144984-1-xsimonar@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.8 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Subject: [ovs-dev] [PATCH ovn 06/15] tests: fixed multiple tests not properly waiting for packets to be received 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" - dhcpv4 : 1 HV, 2 LS, 2 LSPs/LS - dns lookup : 1 HV, 2 LS, 2 LSPs/LS - dhcpv6 : 1 HV, 2 LS, 5 LSPs - IPv6 ND Router Solicitation responder - 4 HV, 1 LS, 1 LR, packet test with HA distributed router gateway port - send gratuitous arp for NAT rules on distributed router - send gratuitous ARP for NAT rules on HA distributed router - external logical port Some of those tests were already "waiting" for packets but were either waiting for the expected number of packets (and hence failing if a garp was received), or were waiting just for a few more packets, to handle garp (but were failing if more garp were received, and were slower than expected as always waiting for a few additional packets). Signed-off-by: Xavier Simonart --- tests/ovn.at | 297 +++++++++++++++------------------------------------ 1 file changed, 88 insertions(+), 209 deletions(-) diff --git a/tests/ovn.at b/tests/ovn.at index 927c505df..eb0ca82b1 100644 --- a/tests/ovn.at +++ b/tests/ovn.at @@ -23,8 +23,11 @@ m4_divert_text([PREPARE_TESTS], diff -u $exp_text.sorted $rcv_text.sorted } ovn_check_packets__ () { - echo - echo "$3: checking packets in $1 against $2:" + if [[ -n "$4" ]]; then + echo "$3: checking packets in $1 against $2: using $4" + else + echo "$3: checking packets in $1 against $2:" + fi rcv_pcap=$1 rcv_text=`echo "$rcv_pcap.packets" | sed 's/\.pcap//'` exp_text=$2 @@ -35,7 +38,13 @@ m4_divert_text([PREPARE_TESTS], echo "rcv_n=$rcv_n exp_n=$exp_n" test $rcv_n -ge $exp_n], [dump_diff__ "$rcv_pcap" "$exp_text"]) - sort $exp_text > expout + if [[ -n "$4" ]]; then + sort $exp_text | $4 > expout + cat $rcv_text | $4 > rcv_tmp + mv rcv_tmp $rcv_text + else + sort $exp_text > expout + fi } ovn_check_packets_remove_broadcast__ () { echo "$3: checking packets in $1 against $2:" @@ -54,14 +63,26 @@ m4_divert_text([PREPARE_TESTS], } ovn_wait_packets__ () { echo "$3: waiting for packets from $2 at $1:" + if [[ -n "$4" ]]; then + echo "$3: checking packets from $2 at $1: using $4" + else + echo "$3: checking packets from $2 at $1:" + fi rcv_pcap=$1 rcv_text=`echo "$rcv_pcap.packets" | sed 's/\.pcap//'` exp_text=$2 + if [[ -n "$4" ]]; then + cmd=$4 + else + cmd=: + fi OVS_WAIT_UNTIL( [$PYTHON "$ovs_srcdir/utilities/ovs-pcap.in" $rcv_pcap > $rcv_text - sort $exp_text > expout - test x"$(sort $rcv_text | comm -2 -3 expout -)" = "x"], + sort $exp_text | $cmd > expout + test x"$(sort $rcv_text | $cmd | comm -2 -3 expout -)" = "x"], [dump_diff__ "$rcv_pcap" "$exp_text"]) + cat $rcv_text | $cmd > rcv_tmp + mv rcv_tmp $rcv_text } ovn_wait_packets_uniq__ () { echo "$3: waiting for packets from $2 at $1:" @@ -140,7 +161,7 @@ m4_divert_text([PREPARE_TESTS], m4_define([OVN_CHECK_PACKETS], [AT_CHECK([$PYTHON "$ovs_srcdir/utilities/ovs-pcap.in" $1 ], [0], [ignore]) - ovn_check_packets__ "$1" "$2" "__file__:__line__" + ovn_check_packets__ "$1" "$2" "__file__:__line__" $3 AT_CHECK([sort $rcv_text], [0], [expout], [ignore], [dump_diff__ "$1" "$2"])]) m4_define([OVN_CHECK_PACKETS_REMOVE_BROADCAST], @@ -6771,13 +6792,7 @@ test_dhcp() { } compare_dhcp_packets() { - received=$($PYTHON "$ovs_srcdir/utilities/ovs-pcap.in" hv1/vif$1-tx.pcap) - expected=$(cat $1.expected) - - if test "$received" != "$expected"; then - AT_CHECK_UNQUOTED([echo "$received"; tcpdump_hex "$received"], [0], - [$(echo "$expected"; tcpdump_hex "$expected")]) - fi + OVN_CHECK_PACKETS([hv1/vif$1-tx.pcap], [$1.expected]) } AT_CAPTURE_FILE([sbflows]) @@ -6975,8 +6990,9 @@ expected_dhcp_opts=0 test_dhcp 11 2 f00000000002 07 0 $ciaddr $offer_ip $request_ip 0 0 ff1000000001 # There is no reply for this. Check for the INFO log in ovn-controller.log -AT_CHECK([test 1 = $(cat hv1/ovn-controller.log | \ -grep "DHCPRELEASE f0:00:00:00:00:02 10.0.0.6" -c)]) +OVS_WAIT_UNTIL( + [test 1 = $(cat hv1/ovn-controller.log | grep "DHCPRELEASE f0:00:00:00:00:02 10.0.0.6" -c) +]) $PYTHON "$ovs_srcdir/utilities/ovs-pcap.in" hv1/vif2-tx.pcap > 2.packets AT_CHECK([cat 2.packets], [0], []) @@ -7133,7 +7149,9 @@ ciaddr=`ip_to_hex 0 0 0 0` request_ip=0 expected_dhcp_opts="" test_dhcp 18 1 f00000000001 04 0 $ciaddr $offer_ip $request_ip 0 0 ff1000000001 $server_ip 02 $expected_dhcp_opts -AT_CHECK([grep -F -iq 'DHCPDECLINE from f0:00:00:00:00:01, 10.0.0.4 duplicated' hv1/ovn-controller.log], [0], []) +OVS_WAIT_UNTIL( + [test 1 -le $(grep -F -i -c 'DHCPDECLINE from f0:00:00:00:00:01, 10.0.0.4 duplicated' hv1/ovn-controller.log) +]) # Send Etherboot. @@ -7413,12 +7431,8 @@ test_dhcpv6_release() { check_packets() { local port=$1 - $PYTHON "$ovs_srcdir/utilities/ovs-pcap.in" hv1/vif$port-tx.pcap | trim_zeros > $port.packets # Skipping UDP checksum - cat $port.expected | cut -c 1-120,125- > expout - AT_CHECK([cat $port.packets | cut -c 1-120,125- ], [0], [expout]) - - rm $port.packets + OVN_CHECK_PACKETS([hv1/vif$port-tx.pcap], [$port.expected], ["trim_zeros | cut -c 1-120,125-"]) rm $port.expected } @@ -11020,12 +11034,9 @@ test_dns 1 f00000000001 f000000000f0 $src_ip $dst_ip $dns_reply $dns_req_data $d # NXT_RESUMEs should be 1. OVS_WAIT_UNTIL([test 1 = `cat ofctl_monitor*.log | grep -c NXT_RESUME`]) -$PYTHON "$ovs_srcdir/utilities/ovs-pcap.in" hv1/vif1-tx.pcap > 1.packets -cat 1.expected | cut -c -48 > expout -AT_CHECK([cat 1.packets | cut -c -48], [0], [expout]) +OVN_CHECK_PACKETS([hv1/vif1-tx.pcap], [1.expected], ["cut -c -48"]) # Skipping the IPv4 checksum. -cat 1.expected | cut -c 53- > expout -AT_CHECK([cat 1.packets | cut -c 53-], [0], [expout]) +OVN_CHECK_PACKETS([hv1/vif1-tx.pcap], [1.expected], ["cut -c 53-"]) reset_pcap_file hv1-vif1 hv1/vif1 reset_pcap_file hv1-vif2 hv1/vif2 @@ -11042,12 +11053,9 @@ test_dns 2 f00000000002 f000000000f0 $src_ip $dst_ip $dns_reply $dns_req_data $d # NXT_RESUMEs should be 2. OVS_WAIT_UNTIL([test 2 = `cat ofctl_monitor*.log | grep -c NXT_RESUME`]) -$PYTHON "$ovs_srcdir/utilities/ovs-pcap.in" hv1/vif2-tx.pcap > 2.packets -cat 2.expected | cut -c -48 > expout -AT_CHECK([cat 2.packets | cut -c -48], [0], [expout]) +OVN_CHECK_PACKETS([hv1/vif2-tx.pcap], [2.expected], ["cut -c -48"]) # Skipping the IPv4 checksum. -cat 2.expected | cut -c 53- > expout -AT_CHECK([cat 2.packets | cut -c 53-], [0], [expout]) +OVN_CHECK_PACKETS([hv1/vif2-tx.pcap], [2.expected], ["cut -c 53-"]) reset_pcap_file hv1-vif1 hv1/vif1 reset_pcap_file hv1-vif2 hv1/vif2 @@ -11065,12 +11073,9 @@ test_dns 2 f00000000002 f000000000f0 $src_ip $dst_ip $dns_reply $dns_req_data $d # NXT_RESUMEs should be 3. OVS_WAIT_UNTIL([test 3 = `cat ofctl_monitor*.log | grep -c NXT_RESUME`]) -$PYTHON "$ovs_srcdir/utilities/ovs-pcap.in" hv1/vif2-tx.pcap > 2.packets -cat 2.expected | cut -c -48 > expout -AT_CHECK([cat 2.packets | cut -c -48], [0], [expout]) +OVN_CHECK_PACKETS([hv1/vif2-tx.pcap], [2.expected], ["cut -c -48"]) # Skipping the IPv4 checksum. -cat 2.expected | cut -c 53- > expout -AT_CHECK([cat 2.packets | cut -c 53-], [0], [expout]) +OVN_CHECK_PACKETS([hv1/vif2-tx.pcap], [2.expected], ["cut -c 53-"]) reset_pcap_file hv1-vif1 hv1/vif1 reset_pcap_file hv1-vif2 hv1/vif2 @@ -11147,12 +11152,9 @@ test_dns 2 f00000000002 f000000000f0 $src_ip $dst_ip $dns_reply $dns_req_data $d # NXT_RESUMEs should be 5. OVS_WAIT_UNTIL([test 5 = `cat ofctl_monitor*.log | grep -c NXT_RESUME`]) -$PYTHON "$ovs_srcdir/utilities/ovs-pcap.in" hv1/vif2-tx.pcap > 2.packets -cat 2.expected | cut -c -48 > expout -AT_CHECK([cat 2.packets | cut -c -48], [0], [expout]) +OVN_CHECK_PACKETS([hv1/vif2-tx.pcap], [2.expected], ["cut -c -48"]) # Skipping the IPv4 checksum. -cat 2.expected | cut -c 53- > expout -AT_CHECK([cat 2.packets | cut -c 53-], [0], [expout]) +OVN_CHECK_PACKETS([hv1/vif2-tx.pcap], [2.expected], ["cut -c 53-"]) reset_pcap_file hv1-vif1 hv1/vif1 reset_pcap_file hv1-vif2 hv1/vif2 @@ -11170,12 +11172,9 @@ test_dns 2 f00000000002 f000000000f0 $src_ip $dst_ip $dns_reply $dns_req_data $d # NXT_RESUMEs should be 6. OVS_WAIT_UNTIL([test 6 = `cat ofctl_monitor*.log | grep -c NXT_RESUME`]) -$PYTHON "$ovs_srcdir/utilities/ovs-pcap.in" hv1/vif2-tx.pcap > 2.packets -cat 2.expected | cut -c -48 > expout -AT_CHECK([cat 2.packets | cut -c -48], [0], [expout]) +OVN_CHECK_PACKETS([hv1/vif2-tx.pcap], [2.expected], ["cut -c -48"]) # Skipping the IPv4 checksum. -cat 2.expected | cut -c 53- > expout -AT_CHECK([cat 2.packets | cut -c 53-], [0], [expout]) +OVN_CHECK_PACKETS([hv1/vif2-tx.pcap], [2.expected], ["cut -c 53-"]) reset_pcap_file hv1-vif1 hv1/vif1 reset_pcap_file hv1-vif2 hv1/vif2 @@ -11237,12 +11236,9 @@ test_dns 1 f00000000001 f000000000f0 $src_ip $dst_ip $dns_reply $dns_req_data $d # NXT_RESUMEs should be 9. OVS_WAIT_UNTIL([test 9 = `cat ofctl_monitor*.log | grep -c NXT_RESUME`]) -$PYTHON "$ovs_srcdir/utilities/ovs-pcap.in" hv1/vif1-tx.pcap > 1.packets -cat 1.expected | cut -c -48 > expout -AT_CHECK([cat 1.packets | cut -c -48], [0], [expout]) +OVN_CHECK_PACKETS([hv1/vif1-tx.pcap], [1.expected], ["cut -c -48"]) # Skipping the IPv4 checksum. -cat 1.expected | cut -c 53- > expout -AT_CHECK([cat 1.packets | cut -c 53-], [0], [expout]) +OVN_CHECK_PACKETS([hv1/vif1-tx.pcap], [1.expected], ["cut -c 53-"]) reset_pcap_file hv1-vif1 hv1/vif1 reset_pcap_file hv1-vif2 hv1/vif2 @@ -11260,10 +11256,8 @@ test_dns6 1 f00000000001 f000000000f0 $src_ip $dst_ip $dns_reply $dns_req_data $ # NXT_RESUMEs should be 10 OVS_WAIT_UNTIL([test 10 = `cat ofctl_monitor*.log | grep -c NXT_RESUME`]) -$PYTHON "$ovs_srcdir/utilities/ovs-pcap.in" hv1/vif1-tx.pcap > 1.packets # Skipping the UDP checksum. -cat 1.expected | cut -c 1-120,125- > expout -AT_CHECK([cat 1.packets | cut -c 1-120,125-], [0], [expout]) +OVN_CHECK_PACKETS([hv1/vif1-tx.pcap], [1.expected], ["cut -c 1-120,125-"]) reset_pcap_file hv1-vif1 hv1/vif1 reset_pcap_file hv1-vif2 hv1/vif2 @@ -11289,12 +11283,9 @@ test_dns 1 f00000000001 f000000000f0 $src_ip $dst_ip $dns_reply $dns_req_data $d # NXT_RESUMEs should be 11. OVS_WAIT_UNTIL([test 11 = `cat ofctl_monitor*.log | grep -c NXT_RESUME`]) -$PYTHON "$ovs_srcdir/utilities/ovs-pcap.in" hv1/vif1-tx.pcap > 1.packets -cat 1.expected | cut -c -48 > expout -AT_CHECK([cat 1.packets | cut -c -48], [0], [expout]) +OVN_CHECK_PACKETS([hv1/vif1-tx.pcap], [1.expected], ["cut -c -48"]) # Skipping the IPv4 checksum. -cat 1.expected | cut -c 53- > expout -AT_CHECK([cat 1.packets | cut -c 53-], [0], [expout]) +OVN_CHECK_PACKETS([hv1/vif1-tx.pcap], [1.expected], ["cut -c 53-"]) reset_pcap_file hv1-vif1 hv1/vif1 reset_pcap_file hv1-vif2 hv1/vif2 @@ -11312,12 +11303,9 @@ test_dns 1 f00000000001 f000000000f0 $src_ip $dst_ip $dns_reply $dns_req_data $d # NXT_RESUMEs should be 12. OVS_WAIT_UNTIL([test 12 = `cat ofctl_monitor*.log | grep -c NXT_RESUME`]) -$PYTHON "$ovs_srcdir/utilities/ovs-pcap.in" hv1/vif1-tx.pcap > 1.packets -cat 1.expected | cut -c -48 > expout -AT_CHECK([cat 1.packets | cut -c -48], [0], [expout]) +OVN_CHECK_PACKETS([hv1/vif1-tx.pcap], [1.expected], ["cut -c -48"]) # Skipping the IPv4 checksum. -cat 1.expected | cut -c 53- > expout -AT_CHECK([cat 1.packets | cut -c 53-], [0], [expout]) +OVN_CHECK_PACKETS([hv1/vif1-tx.pcap], [1.expected], ["cut -c 53-"]) reset_pcap_file hv1-vif1 hv1/vif1 reset_pcap_file hv1-vif2 hv1/vif2 @@ -11497,30 +11485,7 @@ test_ip_packet() # Resend packet from foo1 to outside1 check as hv1 ovs-appctl netdev-dummy/receive hv1-vif1 $packet - AT_CAPTURE_FILE([exp]) - AT_CAPTURE_FILE([rcv]) - check_packets() { - > exp - > rcv - - pcap=ext1/vif1-tx.pcap - type=ext1-vif1.expected - echo "--- $pcap" | tee -a exp >> rcv - sort -u "$type" >> exp - $PYTHON "$ovs_srcdir/utilities/ovs-pcap.in" $pcap | sort -u >> rcv - echo | tee -a exp >> rcv - - pcap=$active_gw/br-phys_n1-tx.pcap - echo "--- $pcap" | tee -a exp >> rcv - sort -u "$type" >> exp - $PYTHON "$ovs_srcdir/utilities/ovs-pcap.in" $pcap > packets - (grep "$expected" packets; grep "$exp_gw_ip_garp" packets) | sort -u >> rcv - echo | tee -a exp >> rcv - - $at_diff exp rcv >/dev/null - } - - OVS_WAIT_UNTIL([check_packets], [$at_diff -F'^---' exp rcv]) + OVN_CHECK_PACKETS_CONTAIN([ext1/vif1-tx.pcap], [ext1-vif1.expected]) if test $backup_vswitchd_dead != 1; then # Check for backup gw only if vswitchd is alive @@ -12256,21 +12221,16 @@ OVN_WAIT_PATCH_PORT_FLOWS(["ln_port"], ["hv3"]) # Re-add nat-addresses option ovn-nbctl lsp-set-options lrp0-rp router-port=lrp0 nat-addresses="router" -# Wait for packets to be received. -OVS_WAIT_UNTIL([test `wc -c < "hv1/snoopvif-tx.pcap"` -ge 250]) trim_zeros() { sed 's/\(00\)\{1,\}$//' } -$PYTHON "$ovs_srcdir/utilities/ovs-pcap.in" hv1/snoopvif-tx.pcap | trim_zeros | sort | uniq > packets garp_1="fffffffffffff0000000000308060001080006040001f00000000003c0a80003000000000000c0a80003" -echo $garp_1 > expout +echo $garp_1 > expected_out garp_2="fffffffffffff0000000000408060001080006040001f00000000004c0a80004000000000000c0a80004" -echo $garp_2 >> expout +echo $garp_2 >> expected_out -cat packets | grep $garp_1 | head -1 > exp -cat packets | grep $garp_2 | head -1 >> exp -AT_CHECK([cat exp], [0], [expout]) +OVN_CHECK_PACKETS_CONTAIN([hv1/snoopvif-tx.pcap], [expected_out], "trim_zeros") OVN_CLEANUP([hv1],[hv2],[hv3]) @@ -12716,14 +12676,9 @@ test_ipv6_ra 1 $src_mac $src_lla $addr_mode 0 $default_prefix_option_config # NXT_RESUME should be 1. OVS_WAIT_UNTIL([test 1 = `cat ofctl_monitor*.log | grep -c NXT_RESUME`]) -$PYTHON "$ovs_srcdir/utilities/ovs-pcap.in" hv1/vif1-tx.pcap > 1.packets - -cat 1.expected | cut -c -112 > expout -AT_CHECK([cat 1.packets | cut -c -112], [0], [expout]) - +OVN_CHECK_PACKETS([hv1/vif1-tx.pcap], [1.expected], ["cut -c -112"]) # Skipping the ICMPv6 checksum. -cat 1.expected | cut -c 117- > expout -AT_CHECK([cat 1.packets | cut -c 117-], [0], [expout]) +OVN_CHECK_PACKETS([hv1/vif1-tx.pcap], [1.expected], ["cut -c 117-"]) rm -f *.expected reset_pcap_file hv1-vif1 hv1/vif1 @@ -12756,14 +12711,9 @@ test_ipv6_ra 2 $src_mac $src_lla $addr_mode $mtu $default_prefix_option_config $ # NXT_RESUME should be 2. OVS_WAIT_UNTIL([test 2 = `cat ofctl_monitor*.log | grep -c NXT_RESUME`]) -$PYTHON "$ovs_srcdir/utilities/ovs-pcap.in" hv1/vif2-tx.pcap > 2.packets - -cat 2.expected | cut -c -112 > expout -AT_CHECK([cat 2.packets | cut -c -112], [0], [expout]) - +OVN_CHECK_PACKETS([hv1/vif2-tx.pcap], [2.expected], ["cut -c -112"]) # Skipping the ICMPv6 checksum. -cat 2.expected | cut -c 117- > expout -AT_CHECK([cat 2.packets | cut -c 117-], [0], [expout]) +OVN_CHECK_PACKETS([hv1/vif2-tx.pcap], [2.expected], ["cut -c 117-"]) rm -f *.expected reset_pcap_file hv1-vif1 hv1/vif1 @@ -12790,14 +12740,9 @@ test_ipv6_ra 3 $src_mac $src_lla $addr_mode $mtu $default_prefix_option_config " # NXT_RESUME should be 3. OVS_WAIT_UNTIL([test 3 = `cat ofctl_monitor*.log | grep -c NXT_RESUME`]) -$PYTHON "$ovs_srcdir/utilities/ovs-pcap.in" hv1/vif3-tx.pcap > 3.packets - -cat 3.expected | cut -c -112 > expout -AT_CHECK([cat 3.packets | cut -c -112], [0], [expout]) - +OVN_CHECK_PACKETS([hv1/vif3-tx.pcap], [3.expected], ["cut -c -112"]) # Skipping the ICMPv6 checksum. -cat 3.expected | cut -c 117- > expout -AT_CHECK([cat 3.packets | cut -c 117-], [0], [expout]) +OVN_CHECK_PACKETS([hv1/vif3-tx.pcap], [3.expected], ["cut -c 117-"]) rm -f *.expected reset_pcap_file hv1-vif1 hv1/vif1 @@ -12822,14 +12767,9 @@ test_ipv6_ra 1 $src_mac $src_lla $addr_mode $mtu $default_prefix_option_config # NXT_RESUME should be 4. OVS_WAIT_UNTIL([test 4 = `cat ofctl_monitor*.log | grep -c NXT_RESUME`]) -$PYTHON "$ovs_srcdir/utilities/ovs-pcap.in" hv1/vif1-tx.pcap > 1.packets - -cat 1.expected | cut -c -112 > expout -AT_CHECK([cat 1.packets | cut -c -112], [0], [expout]) - +OVN_CHECK_PACKETS([hv1/vif1-tx.pcap], [1.expected], ["cut -c -112"]) # Skipping the ICMPv6 checksum. -cat 1.expected | cut -c 117- > expout -AT_CHECK([cat 1.packets | cut -c 117-], [0], [expout]) +OVN_CHECK_PACKETS([hv1/vif1-tx.pcap], [1.expected], ["cut -c 117-"]) rm -f *.expected reset_pcap_file hv1-vif1 hv1/vif1 @@ -13895,8 +13835,6 @@ as hv1 reset_pcap_file snoopvif hv1/snoopvif # add nat-addresses option ovn-nbctl --wait=hv lsp-set-options lrp0-rp router-port=lrp0 nat-addresses="router" -# Wait for packets to be received through hv2. -OVS_WAIT_UNTIL([test `wc -c < "hv1/snoopvif-tx.pcap"` -ge 100]) trim_zeros() { sed 's/\(00\)\{1,\}$//' } @@ -13906,22 +13844,10 @@ only_broadcast_from_lrp1() { } garp="fffffffffffff0000000000108060001080006040001f00000000001c0a80064000000000000c0a80064" -echo $garp > expout +echo $garp > expected_out -OVS_WAIT_UNTIL( - [$PYTHON "$ovs_srcdir/utilities/ovs-pcap.in" hv1/snoopvif-tx.pcap > rcv_text - exp_rcvd=$(cat rcv_text | grep $garp | wc -l) - echo "expected received = $exp_rcvd" - test $exp_rcvd -ge 1]) - -$PYTHON "$ovs_srcdir/utilities/ovs-pcap.in" hv1/snoopvif-tx.pcap | trim_zeros | only_broadcast_from_lrp1 | uniq > hv1_snoop_tx -echo "packets on hv1-snoopvif:" -cat hv1_snoop_tx -AT_CHECK([sort hv1_snoop_tx], [0], [expout]) -$PYTHON "$ovs_srcdir/utilities/ovs-pcap.in" hv2/br-phys_n1-tx.pcap | trim_zeros | only_broadcast_from_lrp1 | uniq > hv2_br_phys_tx -echo "packets on hv2 br-phys tx" -cat hv2_br_phys_tx -AT_CHECK([grep $garp hv2_br_phys_tx | sort], [0], [expout]) +OVN_CHECK_PACKETS_CONTAIN([hv1/snoopvif-tx.pcap], [expected_out], "trim_zeros") +OVN_CHECK_PACKETS_CONTAIN([hv2/br-phys_n1-tx.pcap], [expected_out], "trim_zeros") $PYTHON "$ovs_srcdir/utilities/ovs-pcap.in" hv3/br-phys_n1-tx.pcap | trim_zeros | only_broadcast_from_lrp1 | uniq > hv3_br_phys_tx echo "packets on hv3 br-phys tx" cat hv3_br_phys_tx @@ -13947,17 +13873,8 @@ trim_zeros() { sed 's/\(00\)\{1,\}$//' } -# Wait for packets to be received. -OVS_WAIT_UNTIL( - [$PYTHON "$ovs_srcdir/utilities/ovs-pcap.in" hv1/snoopvif-tx.pcap > rcv_text - exp_rcvd=$(cat rcv_text | grep $garp | wc -l) - echo "expected received = $exp_rcvd" - test $exp_rcvd -ge 1]) - -$PYTHON "$ovs_srcdir/utilities/ovs-pcap.in" hv1/snoopvif-tx.pcap | trim_zeros | only_broadcast_from_lrp1 | uniq > hv1_snoopvif_tx -AT_CHECK([sort hv1_snoopvif_tx], [0], [expout]) -$PYTHON "$ovs_srcdir/utilities/ovs-pcap.in" hv3/br-phys_n1-tx.pcap | trim_zeros | only_broadcast_from_lrp1 | uniq > hv3_br_phys_tx -AT_CHECK([grep $garp hv3_br_phys_tx | sort], [0], [expout]) +OVN_CHECK_PACKETS_CONTAIN([hv1/snoopvif-tx.pcap], [expected_out], "trim_zeros") +OVN_CHECK_PACKETS_CONTAIN([hv3/br-phys_n1-tx.pcap], [expected_out], "trim_zeros") $PYTHON "$ovs_srcdir/utilities/ovs-pcap.in" hv2/br-phys_n1-tx.pcap | trim_zeros | only_broadcast_from_lrp1 | uniq > hv2_br_phys_tx AT_CHECK([grep $garp hv2_br_phys_tx | sort], [0], []) @@ -13990,25 +13907,15 @@ ovn-nbctl --wait=hv lsp-set-options lrp0-rp router-port=lrp0 nat-addresses="rout OVS_WAIT_UNTIL([test 1 = `ovn-sbctl --bare --columns nat_addresses find port_binding \ logical_port=lrp0-rp | grep is_chassis | wc -l`]) -# Wait for packets to be received. -OVS_WAIT_UNTIL([test `wc -c < "hv1/snoopvif-tx.pcap"` -ge 100]) trim_zeros() { sed 's/\(00\)\{1,\}$//' } garp="fffffffffffff00000000001810007de08060001080006040001f00000000001c0a80064000000000000c0a80064" -echo $garp > expout +echo $garp > expected_out -OVS_WAIT_UNTIL( - [$PYTHON "$ovs_srcdir/utilities/ovs-pcap.in" hv1/snoopvif-tx.pcap > rcv_text - exp_rcvd=$(cat rcv_text | grep $garp | wc -l) - echo "expected received = $exp_rcvd" - test $exp_rcvd -ge 1]) - -$PYTHON "$ovs_srcdir/utilities/ovs-pcap.in" hv1/snoopvif-tx.pcap | trim_zeros | only_broadcast_from_lrp1 | uniq > hv1_snoopvif_tx -AT_CHECK([sort hv1_snoopvif_tx], [0], [expout]) -$PYTHON "$ovs_srcdir/utilities/ovs-pcap.in" hv3/br-phys_n1-tx.pcap | trim_zeros | only_broadcast_from_lrp1 | uniq > hv3_br_phys_tx -AT_CHECK([grep $garp hv3_br_phys_tx | sort], [0], [expout]) +OVN_CHECK_PACKETS_CONTAIN([hv1/snoopvif-tx.pcap], [expected_out], "trim_zeros") +OVN_CHECK_PACKETS_CONTAIN([hv3/br-phys_n1-tx.pcap], [expected_out], "trim_zeros") $PYTHON "$ovs_srcdir/utilities/ovs-pcap.in" hv2/br-phys_n1-tx.pcap | trim_zeros | only_broadcast_from_lrp1 | uniq > hv2_br_phys_tx AT_CHECK([grep $garp hv2_br_phys_tx | sort], [0], []) @@ -19895,12 +19802,9 @@ OVS_WAIT_UNTIL([test 1 = `cat ofctl_monitor0_hv1.log | grep -c NXT_RESUME`]) # NXT_RESUMEs should be 0 in hv2. OVS_WAIT_UNTIL([test 0 = `cat ofctl_monitor0_hv2.log | grep -c NXT_RESUME`]) -$PYTHON "$ovs_srcdir/utilities/ovs-pcap.in" hv1/ext1-tx.pcap > ext1_v4.packets -cat ext1_v4.expected | cut -c -48 > expout -AT_CHECK([cat ext1_v4.packets | cut -c -48], [0], [expout]) +OVN_CHECK_PACKETS([hv1/ext1-tx.pcap], [ext1_v4.expected], ["cut -c -48"]) # Skipping the IPv4 checksum. -cat ext1_v4.expected | cut -c 53- > expout -AT_CHECK([cat ext1_v4.packets | cut -c 53-], [0], [expout]) +OVN_CHECK_PACKETS([hv1/ext1-tx.pcap], [ext1_v4.expected], ["cut -c 53-"]) # ovs-ofctl also resumes the packets and this causes other ports to receive # the DHCP request packet. So reset the pcap files so that its easier to test. @@ -19922,13 +19826,9 @@ OVS_WAIT_UNTIL([test 2 = `cat ofctl_monitor0_hv1.log | grep -c NXT_RESUME`]) # NXT_RESUMEs should be 0 in hv2. OVS_WAIT_UNTIL([test 0 = `cat ofctl_monitor0_hv2.log | grep -c NXT_RESUME`]) -$PYTHON "$ovs_srcdir/utilities/ovs-pcap.in" hv1/ext1-tx.pcap | \ -sort > ext1_v6.packets -cat ext1_v6.expected | cut -c -120 > expout -AT_CHECK([cat ext1_v6.packets | cut -c -120], [0], [expout]) +OVN_CHECK_PACKETS([hv1/ext1-tx.pcap], [ext1_v6.expected], ["cut -c -120"]) # Skipping the UDP checksum -cat ext1_v6.expected | cut -c 125- > expout -AT_CHECK([cat ext1_v6.packets | cut -c 125-], [0], [expout]) +OVN_CHECK_PACKETS([hv1/ext1-tx.pcap], [ext1_v6.expected], ["cut -c 125-"]) rm -f ext1_v6.expected rm -f ext1_v6.packets @@ -19988,12 +19888,9 @@ OVS_WAIT_UNTIL([test 2 = `cat ofctl_monitor0_hv1.log | grep -c NXT_RESUME`]) # NXT_RESUMEs should be 1 in hv2. OVS_WAIT_UNTIL([test 1 = `cat ofctl_monitor0_hv2.log | grep -c NXT_RESUME`]) -$PYTHON "$ovs_srcdir/utilities/ovs-pcap.in" hv1/ext1-tx.pcap > ext1_v4.packets -cat ext1_v4.expected | cut -c -48 > expout -AT_CHECK([cat ext1_v4.packets | cut -c -48], [0], [expout]) +OVN_CHECK_PACKETS([hv1/ext1-tx.pcap], [ext1_v4.expected], ["cut -c -48"]) # Skipping the IPv4 checksum. -cat ext1_v4.expected | cut -c 53- > expout -AT_CHECK([cat ext1_v4.packets | cut -c 53-], [0], [expout]) +OVN_CHECK_PACKETS([hv1/ext1-tx.pcap], [ext1_v4.expected], ["cut -c 53-"]) # ovs-ofctl also resumes the packets and this causes other ports to receive # the DHCP request packet. So reset the pcap files so that its easier to test. @@ -20014,13 +19911,9 @@ OVS_WAIT_UNTIL([test 2 = `cat ofctl_monitor0_hv1.log | grep -c NXT_RESUME`]) # NXT_RESUMEs should be 2 in hv2. OVS_WAIT_UNTIL([test 2 = `cat ofctl_monitor0_hv2.log | grep -c NXT_RESUME`]) -$PYTHON "$ovs_srcdir/utilities/ovs-pcap.in" hv1/ext1-tx.pcap | \ -sort > ext1_v6.packets -cat ext1_v6.expected | cut -c -120 > expout -AT_CHECK([cat ext1_v6.packets | cut -c -120], [0], [expout]) +OVN_CHECK_PACKETS([hv1/ext1-tx.pcap], [ext1_v6.expected], ["cut -c -120"]) # Skipping the UDP checksum -cat ext1_v6.expected | cut -c 125- > expout -AT_CHECK([cat ext1_v6.packets | cut -c 125-], [0], [expout]) +OVN_CHECK_PACKETS([hv1/ext1-tx.pcap], [ext1_v6.expected], ["cut -c 125-"]) rm -f ext1_v6.expected rm -f ext1_v6.packets @@ -20096,12 +19989,9 @@ OVS_WAIT_UNTIL([test 3 = `cat ofctl_monitor0_hv1.log | grep -c NXT_RESUME`]) # NXT_RESUMEs should be 2 in hv2. OVS_WAIT_UNTIL([test 2 = `cat ofctl_monitor0_hv2.log | grep -c NXT_RESUME`]) -$PYTHON "$ovs_srcdir/utilities/ovs-pcap.in" hv1/ext1-tx.pcap > ext1_v4.packets -cat ext1_v4.expected | cut -c -48 > expout -AT_CHECK([cat ext1_v4.packets | cut -c -48], [0], [expout]) +OVN_CHECK_PACKETS([hv1/ext1-tx.pcap], [ext1_v4.expected], ["cut -c -48"]) # Skipping the IPv4 checksum. -cat ext1_v4.expected | cut -c 53- > expout -AT_CHECK([cat ext1_v4.packets | cut -c 53-], [0], [expout]) +OVN_CHECK_PACKETS([hv1/ext1-tx.pcap], [ext1_v4.expected], ["cut -c 53-"]) # ovs-ofctl also resumes the packets and this causes other ports to receive # the DHCP request packet. So reset the pcap files so that its easier to test. @@ -20123,13 +20013,9 @@ OVS_WAIT_UNTIL([test 4 = `cat ofctl_monitor0_hv1.log | grep -c NXT_RESUME`]) # NXT_RESUMEs should be 2 in hv2. OVS_WAIT_UNTIL([test 2 = `cat ofctl_monitor0_hv2.log | grep -c NXT_RESUME`]) -$PYTHON "$ovs_srcdir/utilities/ovs-pcap.in" hv1/ext1-tx.pcap | \ -sort > ext1_v6.packets -cat ext1_v6.expected | cut -c -120 > expout -AT_CHECK([cat ext1_v6.packets | cut -c -120], [0], [expout]) +OVN_CHECK_PACKETS([hv1/ext1-tx.pcap], [ext1_v6.expected], ["cut -c -120"]) # Skipping the UDP checksum -cat ext1_v6.expected | cut -c 125- > expout -AT_CHECK([cat ext1_v6.packets | cut -c 125-], [0], [expout]) +OVN_CHECK_PACKETS([hv1/ext1-tx.pcap], [ext1_v6.expected], ["cut -c 125-"]) rm -f ext1_v6.expected rm -f ext1_v6.packets @@ -20177,12 +20063,9 @@ OVS_WAIT_UNTIL([test 2 = `cat ofctl_monitor0_hv2.log | grep -c NXT_RESUME`]) # NXT_RESUMEs should be 1 in hv3. OVS_WAIT_UNTIL([test 1 = `cat ofctl_monitor0_hv3.log | grep -c NXT_RESUME`]) -$PYTHON "$ovs_srcdir/utilities/ovs-pcap.in" hv1/ext1-tx.pcap > ext1_v4.packets -cat ext1_v4.expected | cut -c -48 > expout -AT_CHECK([cat ext1_v4.packets | cut -c -48], [0], [expout]) +OVN_CHECK_PACKETS([hv1/ext1-tx.pcap], [ext1_v4.expected], ["cut -c -48"]) # Skipping the IPv4 checksum. -cat ext1_v4.expected | cut -c 53- > expout -AT_CHECK([cat ext1_v4.packets | cut -c 53-], [0], [expout]) +OVN_CHECK_PACKETS([hv1/ext1-tx.pcap], [ext1_v4.expected], ["cut -c 53-"]) # ovs-ofctl also resumes the packets and this causes other ports to receive # the DHCP request packet. So reset the pcap files so that its easier to test. @@ -20207,13 +20090,9 @@ OVS_WAIT_UNTIL([test 2 = `cat ofctl_monitor0_hv2.log | grep -c NXT_RESUME`]) # NXT_RESUMEs should be 2 in hv3. OVS_WAIT_UNTIL([test 2 = `cat ofctl_monitor0_hv3.log | grep -c NXT_RESUME`]) -$PYTHON "$ovs_srcdir/utilities/ovs-pcap.in" hv1/ext1-tx.pcap | \ -sort > ext1_v6.packets -cat ext1_v6.expected | cut -c -120 > expout -AT_CHECK([cat ext1_v6.packets | cut -c -120], [0], [expout]) +OVN_CHECK_PACKETS([hv1/ext1-tx.pcap], [ext1_v6.expected], ["cut -c -120"]) # Skipping the UDP checksum -cat ext1_v6.expected | cut -c 125- > expout -AT_CHECK([cat ext1_v6.packets | cut -c 125-], [0], [expout]) +OVN_CHECK_PACKETS([hv1/ext1-tx.pcap], [ext1_v6.expected], ["cut -c 125-"]) # disconnect hv3 from the network, hv1 should take over as hv3 From patchwork Mon Sep 18 16:47:06 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Xavier Simonart X-Patchwork-Id: 1836333 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org 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=FWfGOX9K; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=openvswitch.org (client-ip=140.211.166.133; helo=smtp2.osuosl.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=patchwork.ozlabs.org) Received: from smtp2.osuosl.org (smtp2.osuosl.org [140.211.166.133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Rq9hZ5PLBz1ync for ; Tue, 19 Sep 2023 02:47:58 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by smtp2.osuosl.org (Postfix) with ESMTP id 62B19417D6; Mon, 18 Sep 2023 16:47:55 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org 62B19417D6 Authentication-Results: smtp2.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=FWfGOX9K 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 jfQmF2zR_4v7; Mon, 18 Sep 2023 16:47:53 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by smtp2.osuosl.org (Postfix) with ESMTPS id 1FB4741585; Mon, 18 Sep 2023 16:47:51 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org 1FB4741585 Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id A25E5C0DDA; Mon, 18 Sep 2023 16:47:48 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@lists.linuxfoundation.org Received: from smtp3.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by lists.linuxfoundation.org (Postfix) with ESMTP id 0B92DC0DD8 for ; Mon, 18 Sep 2023 16:47:44 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id E5F9E61559 for ; Mon, 18 Sep 2023 16:47:19 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org E5F9E61559 Authentication-Results: smtp3.osuosl.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=FWfGOX9K 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 1TIdxzWK43RC for ; Mon, 18 Sep 2023 16:47:19 +0000 (UTC) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by smtp3.osuosl.org (Postfix) with ESMTPS id 0B0D361553 for ; Mon, 18 Sep 2023 16:47:18 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org 0B0D361553 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1695055638; 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=4GLxUZzosWFN6OLAKDwcH50l/pjIHPwJptEP4XmQOJ4=; b=FWfGOX9KGYj2aZwI+Su9QIVPnAF0j2eXIzzAkDMRC7FKyHroETlEprfG8gyNAo2uwGCCtU RgMgaUgzDS8ZY4TqfNIROYoymS6XN5g+C5OeeggMsgc9alIhuSS6VxDq26h+PsYkHFVYKO hkb4ASEld89HuKTGRp+QuBAcQR5NoGU= Received: from mimecast-mx02.redhat.com (mx-ext.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-342-QKpmxhPEOdS6Z6uxifL6Vg-1; Mon, 18 Sep 2023 12:47:16 -0400 X-MC-Unique: QKpmxhPEOdS6Z6uxifL6Vg-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.rdu2.redhat.com [10.11.54.8]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 36E4B38041C6 for ; Mon, 18 Sep 2023 16:47:15 +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 1E5BBC15BB8; Mon, 18 Sep 2023 16:47:15 +0000 (UTC) From: Xavier Simonart To: xsimonar@redhat.com, dev@openvswitch.org Date: Mon, 18 Sep 2023 18:47:06 +0200 Message-Id: <20230918164714.3144984-8-xsimonar@redhat.com> In-Reply-To: <20230918164714.3144984-1-xsimonar@redhat.com> References: <20230918164714.3144984-1-xsimonar@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.8 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Subject: [ovs-dev] [PATCH ovn 07/15] tests: fixed multiple tests missing ovn-nbctl "wait" 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" - dhcpv4 : 1 HV, 2 LS - Remote port binding - MLD snoop/querier/relay - basic connectivity with multiple requested-chassis Signed-off-by: Xavier Simonart --- tests/ovn-northd.at | 2 +- tests/ovn.at | 15 +++++++++++---- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/tests/ovn-northd.at b/tests/ovn-northd.at index 13c8a0d42..f51e29b11 100644 --- a/tests/ovn-northd.at +++ b/tests/ovn-northd.at @@ -10340,7 +10340,7 @@ wait_for_ports_up sw0-r1 check_column $remote_chassis_uuid Port_Binding chassis logical_port=sw0-r1 # Set the type to router and ovn-northd should not claim it. -check ovn-nbctl lsp-set-type sw0-r1 router +check ovn-nbctl --wait=hv lsp-set-type sw0-r1 router check_column '' Port_Binding chassis logical_port=sw0-r1 AT_CLEANUP diff --git a/tests/ovn.at b/tests/ovn.at index eb0ca82b1..b1bdae7d2 100644 --- a/tests/ovn.at +++ b/tests/ovn.at @@ -7169,7 +7169,7 @@ ovn-nbctl dhcp-options-set-options $d3 \ lease_time=3600 router=10.0.0.1 bootfile_name_alt=\"bootfile_name_alt\" \ bootfile_name=\"bootfile\" -ovn-nbctl lsp-set-dhcpv4-options ls1-lp1 $d3 +ovn-nbctl --wait=hv lsp-set-dhcpv4-options ls1-lp1 $d3 offer_ip=`ip_to_hex 10 0 0 4` server_ip=`ip_to_hex 10 0 0 1` @@ -7535,7 +7535,7 @@ ovn-nbctl dhcp-options-set-options $d1 \ server_id=00:00:00:10:00:01 \ bootfile_name_alt=\"bootfile_name_alt\" \ bootfile_name=\"bootfile_name\" -ovn-nbctl lsp-set-dhcpv6-options ls1-lp2 ${d1} +ovn-nbctl --wait=hv lsp-set-dhcpv6-options ls1-lp2 ${d1} reset_pcap_file hv1-vif2 hv1/vif2 @@ -14811,6 +14811,10 @@ wait_column "$hv2_uuid" Port_Binding requested_additional_chassis logical_port=m # ovn-installed on hv2 should guarantee that. OVS_WAIT_UNTIL([test `as hv2 ovs-vsctl get Interface migrator external_ids:ovn-installed` = '"true"']) +# Still, this does not guarantee that all flows are installed on hv3: hv3 (might) still need to receive and handle +# additional_chassis for migrator port +ovn-nbctl --wait=hv sync + # check that... # unicast from First arrives to hv1:Migrator # unicast from First arrives to hv2:Migrator @@ -14897,6 +14901,9 @@ wait_column "" Port_Binding requested_additional_chassis logical_port=migrator # For instance, migrator port might still be up from prior to complete migration to hv2 OVS_WAIT_UNTIL([test `as hv2 ovs-vsctl get Interface migrator external_ids:ovn-installed` = '"true"']) +# Give time for hv3 to handle the change of Port_Binding for migrator port +ovn-nbctl --wait=hv sync + # check that... # unicast from Third doesn't arrive to hv1:Migrator # unicast from Third arrives to hv2:Migrator @@ -23324,7 +23331,7 @@ check ovn-nbctl set Logical_Switch sw2 \ other_config:mcast_querier="false" # Enable multicast snooping on sw3. -check ovn-nbctl --wait=sb set Logical_Switch sw3 \ +check ovn-nbctl --wait=hv set Logical_Switch sw3 \ other_config:mcast_querier="false" \ other_config:mcast_snoop="true" @@ -23363,7 +23370,7 @@ OVS_WAIT_UNTIL( [$at_diff -F'^---' exp rcv]) # Enable multicast relay on rtr -check ovn-nbctl --wait=sb set logical_router rtr options:mcast_relay="true" +check ovn-nbctl --wait=hv set logical_router rtr options:mcast_relay="true" AT_CAPTURE_FILE([sbflows6]) ovn-sbctl dump-flows > sbflows6 From patchwork Mon Sep 18 16:47:07 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Xavier Simonart X-Patchwork-Id: 1836340 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org 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=C5W2y+N6; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=openvswitch.org (client-ip=140.211.166.133; helo=smtp2.osuosl.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=patchwork.ozlabs.org) Received: from smtp2.osuosl.org (smtp2.osuosl.org [140.211.166.133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Rq9j76rFgz1ync for ; Tue, 19 Sep 2023 02:48:27 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by smtp2.osuosl.org (Postfix) with ESMTP id 7DCEA41A41; Mon, 18 Sep 2023 16:48:25 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org 7DCEA41A41 Authentication-Results: smtp2.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=C5W2y+N6 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 hMR8TF2Y1Q3t; Mon, 18 Sep 2023 16:48:23 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [IPv6:2605:bc80:3010:104::8cd3:938]) by smtp2.osuosl.org (Postfix) with ESMTPS id F15E84151A; Mon, 18 Sep 2023 16:48:06 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org F15E84151A Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id A9E65C0DDF; Mon, 18 Sep 2023 16:47:55 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@lists.linuxfoundation.org Received: from smtp1.osuosl.org (smtp1.osuosl.org [IPv6:2605:bc80:3010::138]) by lists.linuxfoundation.org (Postfix) with ESMTP id 1A35CC0DE1 for ; Mon, 18 Sep 2023 16:47:49 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id 6799E82122 for ; Mon, 18 Sep 2023 16:47:23 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org 6799E82122 Authentication-Results: smtp1.osuosl.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=C5W2y+N6 X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp1.osuosl.org ([127.0.0.1]) by localhost (smtp1.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id kMLmyuMUVbrZ for ; Mon, 18 Sep 2023 16:47:18 +0000 (UTC) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by smtp1.osuosl.org (Postfix) with ESMTPS id 3C71C820C0 for ; Mon, 18 Sep 2023 16:47:18 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org 3C71C820C0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1695055637; 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=5zLwFY2JAtZOxwNIIci42ESaePDWYPJ3fwMflBa7xEY=; b=C5W2y+N62heDvKfLtK8fujwl0I+btwrCPntSFJzvVd4VbWjry95//+rCzXDrQXAZUCz2+k sJOMhMefqJKDDT5ZTDgo/U+OMPa+OWMCYpaLiPh9uadGKActOn9xDXVY2+3tqkYK7KDKss W1s1+yC88EHwsEXuqQ7RulcDtQEkHs8= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-257-XLjzXHuNNaGkPz3Mbv4b9A-1; Mon, 18 Sep 2023 12:47:15 -0400 X-MC-Unique: XLjzXHuNNaGkPz3Mbv4b9A-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.rdu2.redhat.com [10.11.54.8]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 54F33100AFE9 for ; Mon, 18 Sep 2023 16:47:15 +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 3CE3BC15BB8; Mon, 18 Sep 2023 16:47:15 +0000 (UTC) From: Xavier Simonart To: xsimonar@redhat.com, dev@openvswitch.org Date: Mon, 18 Sep 2023 18:47:07 +0200 Message-Id: <20230918164714.3144984-9-xsimonar@redhat.com> In-Reply-To: <20230918164714.3144984-1-xsimonar@redhat.com> References: <20230918164714.3144984-1-xsimonar@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.8 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Subject: [ovs-dev] [PATCH ovn 08/15] tests: fixed "L2 Drop and Allow ACL w/ Stateful ACL" 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" The test was setting ACL rules, then sending packets, then changing ACLs rules, then sending packets. Then it checked whether those packets were properly received/dropped at the end. It should check whether those packets are properly recived/dropped before updating ACLs rules for the second test phase, as otherwise there is no guarentee that packet are fully handled when we update the ACL rules. Signed-off-by: Xavier Simonart --- tests/ovn.at | 76 ++++++++++++++++++++++++++++------------------------ 1 file changed, 41 insertions(+), 35 deletions(-) diff --git a/tests/ovn.at b/tests/ovn.at index b1bdae7d2..863f7c71d 100644 --- a/tests/ovn.at +++ b/tests/ovn.at @@ -18919,6 +18919,46 @@ for sf in 0 1; do done done +check_packets() { + n_allowed=$1 + > expected + > received + for i in 1 2 3; do + echo "--- hv$i vif${i}1" | tee -a expected >> received + sort ${i}1.expected >> expected + $PYTHON "$ovs_srcdir/utilities/ovs-pcap.in" hv$i/vif${i}1-tx.pcap | sort >> received + echo | tee -a expected >> received + done + + # need to verify the log for ACL hit as well, since in the allow case + # (unlike the drop case) it is tricky to pass just with the expected; + # since with the stateful rule the packet will still get by (default + # rule) even if it doesn't hit the allow rule. + # The hit count for the ACL is 6 (1 unicast + 2 non-unicast) * 2 + # (with/without stateful rule) for hv1 and hv2, each. + cat >>expected <>received </dev/null +} + +# We need to wait and check here that packets are received as they should as otherwise packets +# which were just sent might by handled after setting next ACL (allow) rules. +OVS_WAIT_UNTIL([check_packets 0], [$at_diff -F'^---' expected received]) + # Test allow rule #---------------- ovn-nbctl acl-del lsw0 @@ -18967,41 +19007,7 @@ as hv3 ovs-ofctl -O OpenFlow13 dump-flows br-int > offlows3 # Now check the packets actually received against the ones expected. AT_CAPTURE_FILE([expected]) AT_CAPTURE_FILE([received]) -check_packets() { - > expected - > received - for i in 1 2 3; do - echo "--- hv$i vif${i}1" | tee -a expected >> received - sort ${i}1.expected >> expected - $PYTHON "$ovs_srcdir/utilities/ovs-pcap.in" hv$i/vif${i}1-tx.pcap | sort >> received - echo | tee -a expected >> received - done - - # need to verify the log for ACL hit as well, since in the allow case - # (unlike the drop case) it is tricky to pass just with the expected; - # since with the stateful rule the packet will still get by (default - # rule) even if it doesn't hit the allow rule. - # The hit count for the ACL is 6 (1 unicast + 2 non-unicast) * 2 - # (with/without stateful rule) for hv1 and hv2, each. - cat >>expected <>received </dev/null -} -OVS_WAIT_UNTIL([check_packets], [$at_diff -F'^---' expected received]) +OVS_WAIT_UNTIL([check_packets 6], [$at_diff -F'^---' expected received]) OVN_CLEANUP([hv1],[hv2],[hv3]) From patchwork Mon Sep 18 16:47:08 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Xavier Simonart X-Patchwork-Id: 1836334 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org 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=U3SFbzSE; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=openvswitch.org (client-ip=140.211.166.133; helo=smtp2.osuosl.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=patchwork.ozlabs.org) Received: from smtp2.osuosl.org (smtp2.osuosl.org [140.211.166.133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Rq9hd5DjNz1ync for ; Tue, 19 Sep 2023 02:48:01 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by smtp2.osuosl.org (Postfix) with ESMTP id 7D22E417AB; Mon, 18 Sep 2023 16:47:59 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org 7D22E417AB Authentication-Results: smtp2.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=U3SFbzSE 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 fYIeBPX9tbXQ; Mon, 18 Sep 2023 16:47:58 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by smtp2.osuosl.org (Postfix) with ESMTPS id 00DD94179C; Mon, 18 Sep 2023 16:47:52 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org 00DD94179C Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id A968FC0DDE; Mon, 18 Sep 2023 16:47:49 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@lists.linuxfoundation.org Received: from smtp4.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by lists.linuxfoundation.org (Postfix) with ESMTP id 6C3B4C0DDD for ; Mon, 18 Sep 2023 16:47:44 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id B76F141B31 for ; Mon, 18 Sep 2023 16:47:19 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org B76F141B31 Authentication-Results: smtp4.osuosl.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=U3SFbzSE X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp4.osuosl.org ([127.0.0.1]) by localhost (smtp4.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id nJBtM8itW5DO for ; Mon, 18 Sep 2023 16:47:19 +0000 (UTC) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by smtp4.osuosl.org (Postfix) with ESMTPS id E5EB841B05 for ; Mon, 18 Sep 2023 16:47:18 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org E5EB841B05 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1695055637; 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=Zv5ghzeRnxnxvkKV3jAT0ZULVfUN+sn7hOVBtpoWEaU=; b=U3SFbzSE5vN56IlLN+0/jVSBWXGkz2HTMnpP0uGOkwhzgu8ix2kh/IYrMlQB/l+XJReD0s BDmW5OojP036jI5+dig3GZFLNmwtFwo8Ii1nk7Vrfv9G8bkpKX9g7mQQL397jxQomXedXS BQvFY2otqCGnw1F9fE+G1r1Wsn8Tsik= Received: from mimecast-mx02.redhat.com (mx-ext.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-354-KTioNAHQOxW4vRE_V2VTCA-1; Mon, 18 Sep 2023 12:47:16 -0400 X-MC-Unique: KTioNAHQOxW4vRE_V2VTCA-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.rdu2.redhat.com [10.11.54.8]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 735601C03338 for ; Mon, 18 Sep 2023 16:47:15 +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 5AC97C15BB8; Mon, 18 Sep 2023 16:47:15 +0000 (UTC) From: Xavier Simonart To: xsimonar@redhat.com, dev@openvswitch.org Date: Mon, 18 Sep 2023 18:47:08 +0200 Message-Id: <20230918164714.3144984-10-xsimonar@redhat.com> In-Reply-To: <20230918164714.3144984-1-xsimonar@redhat.com> References: <20230918164714.3144984-1-xsimonar@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.8 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Subject: [ovs-dev] [PATCH ovn 09/15] tests: skip test "MAC binding aging" if scapy not available. 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" Signed-off-by: Xavier Simonart --- tests/ovn.at | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/ovn.at b/tests/ovn.at index 863f7c71d..31e41c012 100644 --- a/tests/ovn.at +++ b/tests/ovn.at @@ -34484,6 +34484,7 @@ AT_CLEANUP OVN_FOR_EACH_NORTHD([ AT_SETUP([MAC binding aging]) +AT_SKIP_IF([test $HAVE_SCAPY = no]) ovn_start net_add n1 From patchwork Mon Sep 18 16:47:09 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Xavier Simonart X-Patchwork-Id: 1836336 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org 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=DIt3K2av; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=openvswitch.org (client-ip=2605:bc80:3010::133; helo=smtp2.osuosl.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=patchwork.ozlabs.org) Received: from smtp2.osuosl.org (smtp2.osuosl.org [IPv6:2605:bc80:3010::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Rq9hh475yz1ypc for ; Tue, 19 Sep 2023 02:48:04 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by smtp2.osuosl.org (Postfix) with ESMTP id 20EFA41692; Mon, 18 Sep 2023 16:48:02 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org 20EFA41692 Authentication-Results: smtp2.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=DIt3K2av 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 4SJkablFoYd3; Mon, 18 Sep 2023 16:48:00 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by smtp2.osuosl.org (Postfix) with ESMTPS id EE64041767; Mon, 18 Sep 2023 16:47:54 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org EE64041767 Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id 84CDDC0DE2; Mon, 18 Sep 2023 16:47:50 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@lists.linuxfoundation.org Received: from smtp4.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by lists.linuxfoundation.org (Postfix) with ESMTP id 2586BC0DDF for ; Mon, 18 Sep 2023 16:47:45 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id 374B241A2A for ; Mon, 18 Sep 2023 16:47:20 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org 374B241A2A Authentication-Results: smtp4.osuosl.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=DIt3K2av X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp4.osuosl.org ([127.0.0.1]) by localhost (smtp4.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id vt0Ri-rZ1aoY for ; Mon, 18 Sep 2023 16:47:19 +0000 (UTC) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by smtp4.osuosl.org (Postfix) with ESMTPS id 18EF041B08 for ; Mon, 18 Sep 2023 16:47:18 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org 18EF041B08 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1695055637; 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=4LXToguijVp+hD7xshzCXASECwYfk2/Tp6DYKeAQ73A=; b=DIt3K2avHDJuoBIB4/LL4pbcYz+PmCpt+18g/+uZDNNdsW7+i8fIvS8ACqD9FmUG6KbaFe UYkv3RY6fp8traZ5HHZoeh86FMmp7gaAg4XiekySLVcOI5P5IgqhGpUz3hujv2Z9xD2eax 1FJJYpVFDKAlF4yzIJw+wdQZdHH4qEg= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-441-lxcK6T1gN9WpoFzVBRqh6g-1; Mon, 18 Sep 2023 12:47:16 -0400 X-MC-Unique: lxcK6T1gN9WpoFzVBRqh6g-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.rdu2.redhat.com [10.11.54.8]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 91518811E7B for ; Mon, 18 Sep 2023 16:47:15 +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 7903EC15BB8; Mon, 18 Sep 2023 16:47:15 +0000 (UTC) From: Xavier Simonart To: xsimonar@redhat.com, dev@openvswitch.org Date: Mon, 18 Sep 2023 18:47:09 +0200 Message-Id: <20230918164714.3144984-11-xsimonar@redhat.com> In-Reply-To: <20230918164714.3144984-1-xsimonar@redhat.com> References: <20230918164714.3144984-1-xsimonar@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.8 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Subject: [ovs-dev] [PATCH ovn 10/15] tests: move trim_zeros() to ovn-macros 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" trim_zeros was redefined multiple times in ovn.at, and was undefined for one test. Signed-off-by: Xavier Simonart --- tests/ovn-macros.at | 4 ++++ tests/ovn.at | 53 --------------------------------------------- 2 files changed, 4 insertions(+), 53 deletions(-) diff --git a/tests/ovn-macros.at b/tests/ovn-macros.at index 7c0abdece..400469c88 100644 --- a/tests/ovn-macros.at +++ b/tests/ovn-macros.at @@ -882,6 +882,10 @@ wake_up_ovsdb() { AT_CHECK([kill -CONT $(cat $1/ovsdb-server.pid)]) } +trim_zeros() { + sed 's/\(00\)\{1,\}$//' +} + OVS_END_SHELL_HELPERS m4_define([OVN_POPULATE_ARP], [AT_CHECK(ovn_populate_arp__, [0], [ignore])]) diff --git a/tests/ovn.at b/tests/ovn.at index 31e41c012..8ebf55580 100644 --- a/tests/ovn.at +++ b/tests/ovn.at @@ -7326,10 +7326,6 @@ check ovn-nbctl --wait=hv sync # Start with 0 because the first request will not have NXT_RESUME n_resume=0 -trim_zeros() { - sed 's/\(00\)\{1,\}$//' -} - # This shell function sends a DHCPv6 request packet # test_dhcpv6 INPORT SRC_MAC SRC_LLA DHCPv6_MSG_TYPE OFFER_IP OUTPORT... # The OUTPORTs (zero or more) list the VIFs on which the original DHCPv6 @@ -9049,10 +9045,6 @@ packet=${dst_mac}${src_mac}08004500001c0000000040110000${src_ip}${dst_ip}0035111 # Send IP packet destined to 8.8.8.8 from lsp1lp2 as hv1 ovs-appctl netdev-dummy/receive hv1-ls1lp2 $packet -trim_zeros() { - sed 's/\(00\)\{1,\}$//' -} - # ARP packet should be received with Target IP Address set to 192.168.1.254 and # not 8.8.8.8 @@ -9108,9 +9100,6 @@ AT_CAPTURE_FILE([sbflows]) # Wait for packet to be received. OVS_WAIT_UNTIL([test `wc -c < "hv1/snoopvif-tx.pcap"` -ge 140]) -trim_zeros() { - sed 's/\(00\)\{1,\}$//' -} $PYTHON "$ovs_srcdir/utilities/ovs-pcap.in" hv1/snoopvif-tx.pcap | trim_zeros |sort | uniq > packets AT_CHECK([sort packets], [0], [dnl fffffffffffff0000000000108060001080006040001f00000000001c0a80001000000000000c0a80001 @@ -9307,9 +9296,6 @@ ovn-nbctl list logical_router_port lrp0 ovn-nbctl show # Wait for packet to be received. OVS_WAIT_UNTIL([test `wc -c < "hv1/snoopvif-tx.pcap"` -ge 50]) -trim_zeros() { - sed 's/\(00\)\{1,\}$//' -} $PYTHON "$ovs_srcdir/utilities/ovs-pcap.in" hv1/snoopvif-tx.pcap | trim_zeros | sort | uniq > packets expected="fffffffffffff0000000000108060001080006040001f00000000001c0a80001000000000000c0a80001" echo $expected > expout @@ -9330,9 +9316,6 @@ ovn-nbctl lsp-set-options lrp0-rp router-port=lrp0 nat-addresses="router" exclud # Wait for packets to be received. OVS_WAIT_UNTIL([test `wc -c < "hv1/snoopvif-tx.pcap"` -ge 250]) -trim_zeros() { - sed 's/\(00\)\{1,\}$//' -} $PYTHON "$ovs_srcdir/utilities/ovs-pcap.in" hv1/snoopvif-tx.pcap | trim_zeros > packets g0="fffffffffffff0000000000108060001080006040001f00000000001c0a80001000000000000c0a80001" @@ -10751,10 +10734,6 @@ OVN_POPULATE_ARP wait_for_ports_up check ovn-nbctl --wait=hv sync -trim_zeros() { - sed 's/\(00\)\{1,\}$//' -} - # Send ip packets between foo1 and bar1 # (East-west traffic should flow normally) src_mac="f00000010203" @@ -12187,9 +12166,6 @@ OVN_WAIT_PATCH_PORT_FLOWS(["ln_port"], ["hv2"]) # Wait for packets to be received. OVS_WAIT_UNTIL([test `wc -c < "hv1/snoopvif-tx.pcap"` -ge 100]) -trim_zeros() { - sed 's/\(00\)\{1,\}$//' -} $PYTHON "$ovs_srcdir/utilities/ovs-pcap.in" hv1/snoopvif-tx.pcap | trim_zeros > packets expected="fffffffffffff0000000000108060001080006040001f00000000001c0a80001000000000000c0a80001" echo $expected > expout @@ -12221,10 +12197,6 @@ OVN_WAIT_PATCH_PORT_FLOWS(["ln_port"], ["hv3"]) # Re-add nat-addresses option ovn-nbctl lsp-set-options lrp0-rp router-port=lrp0 nat-addresses="router" -trim_zeros() { - sed 's/\(00\)\{1,\}$//' -} - garp_1="fffffffffffff0000000000308060001080006040001f00000000003c0a80003000000000000c0a80003" echo $garp_1 > expected_out garp_2="fffffffffffff0000000000408060001080006040001f00000000004c0a80004000000000000c0a80004" @@ -13835,10 +13807,6 @@ as hv1 reset_pcap_file snoopvif hv1/snoopvif # add nat-addresses option ovn-nbctl --wait=hv lsp-set-options lrp0-rp router-port=lrp0 nat-addresses="router" -trim_zeros() { - sed 's/\(00\)\{1,\}$//' -} - only_broadcast_from_lrp1() { grep "fffffffffffff00000000001" } @@ -13869,10 +13837,6 @@ ovn-nbctl --wait=hv \ as hv3 reset_pcap_file br-phys_n1 hv3/br-phys_n1 as hv1 reset_pcap_file snoopvif hv1/snoopvif -trim_zeros() { - sed 's/\(00\)\{1,\}$//' -} - OVN_CHECK_PACKETS_CONTAIN([hv1/snoopvif-tx.pcap], [expected_out], "trim_zeros") OVN_CHECK_PACKETS_CONTAIN([hv3/br-phys_n1-tx.pcap], [expected_out], "trim_zeros") $PYTHON "$ovs_srcdir/utilities/ovs-pcap.in" hv2/br-phys_n1-tx.pcap | trim_zeros | only_broadcast_from_lrp1 | uniq > hv2_br_phys_tx @@ -13907,10 +13871,6 @@ ovn-nbctl --wait=hv lsp-set-options lrp0-rp router-port=lrp0 nat-addresses="rout OVS_WAIT_UNTIL([test 1 = `ovn-sbctl --bare --columns nat_addresses find port_binding \ logical_port=lrp0-rp | grep is_chassis | wc -l`]) -trim_zeros() { - sed 's/\(00\)\{1,\}$//' -} - garp="fffffffffffff00000000001810007de08060001080006040001f00000000001c0a80064000000000000c0a80064" echo $garp > expected_out @@ -14256,10 +14216,6 @@ wc -l], [0], [4 chassis_uuid=$(fetch_column Chassis _uuid name=hv1) wait_row_count Port_Binding 1 logical_port=cr-ip6_public chassis=$chassis_uuid -trim_zeros() { - sed 's/\(00\)\{1,\}$//' -} - # Test the IPv6 Neighbor Solicitation (NS) - nd_ns action for unknown MAC # addresses. ovn-controller should generate an IPv6 NS request for IPv6 # packets whose MAC is unknown (in the ARP_REQUEST router pipeline stage. @@ -19729,11 +19685,6 @@ test_dhcp() { as hv1 ovs-appctl netdev-dummy/receive hv${inport}-ext${inport} $request } - -trim_zeros() { - sed 's/\(00\)\{1,\}$//' -} - # This shell function sends a DHCPv6 request packet # test_dhcpv6 INPORT SRC_MAC SRC_LLA DHCPv6_MSG_TYPE OFFER_IP OUTPORT... # The OUTPORTs (zero or more) list the VIFs on which the original DHCPv6 @@ -31365,10 +31316,6 @@ send_icmp_packet() { as hv$hv ovs-appctl netdev-dummy/receive hv$hv-vif$inport $packet } -trim_zeros() { - sed 's/\(00\)\{1,\}$//' -} - AS_BOX([Wait for all ports to be up]) wait_for_ports_up From patchwork Mon Sep 18 16:47:10 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Xavier Simonart X-Patchwork-Id: 1836342 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org 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=Ebp7gVIE; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=openvswitch.org (client-ip=2605:bc80:3010::133; helo=smtp2.osuosl.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=patchwork.ozlabs.org) Received: from smtp2.osuosl.org (smtp2.osuosl.org [IPv6:2605:bc80:3010::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Rq9jN1KjVz1ync for ; Tue, 19 Sep 2023 02:48:40 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by smtp2.osuosl.org (Postfix) with ESMTP id B431141A72; Mon, 18 Sep 2023 16:48:37 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org B431141A72 Authentication-Results: smtp2.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=Ebp7gVIE 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 iLIfvZAhrFQM; Mon, 18 Sep 2023 16:48:35 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [IPv6:2605:bc80:3010:104::8cd3:938]) by smtp2.osuosl.org (Postfix) with ESMTPS id 7652B417D5; Mon, 18 Sep 2023 16:48:11 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org 7652B417D5 Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id A679EC0DFC; Mon, 18 Sep 2023 16:47:57 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@lists.linuxfoundation.org Received: from smtp1.osuosl.org (smtp1.osuosl.org [IPv6:2605:bc80:3010::138]) by lists.linuxfoundation.org (Postfix) with ESMTP id 25E53C0DE9 for ; Mon, 18 Sep 2023 16:47:52 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id 90192820E6 for ; Mon, 18 Sep 2023 16:47:23 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org 90192820E6 Authentication-Results: smtp1.osuosl.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=Ebp7gVIE X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp1.osuosl.org ([127.0.0.1]) by localhost (smtp1.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id N6JMRA_0XJjq for ; Mon, 18 Sep 2023 16:47:22 +0000 (UTC) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by smtp1.osuosl.org (Postfix) with ESMTPS id 2CDF98213C for ; Mon, 18 Sep 2023 16:47:21 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org 2CDF98213C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1695055640; 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=BCynNDGM7eox1DyBGgSJMsmELO5dt2hJgyAEa3mU3Ec=; b=Ebp7gVIEks/E7unrIq1djuwPYjkTsYheWn1lLPXLkKcMOpDMuxcheJPhTr5tofGwc0MdGl s/ZnRI5GI3BMDl6+zLzba8KNcs1+Ys6NIXS7+McffzfWl7gUcPicLT5zM+fWPY8Pm3Bhjc tacVMTp5xvjVHKkmG0IiKdQq/ZxvsD0= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-374-0Mrv58OBMPqGeG4Nc70C4Q-1; Mon, 18 Sep 2023 12:47:18 -0400 X-MC-Unique: 0Mrv58OBMPqGeG4Nc70C4Q-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.rdu2.redhat.com [10.11.54.8]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id B028880349C for ; Mon, 18 Sep 2023 16:47:15 +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 97B4DC15BB8; Mon, 18 Sep 2023 16:47:15 +0000 (UTC) From: Xavier Simonart To: xsimonar@redhat.com, dev@openvswitch.org Date: Mon, 18 Sep 2023 18:47:10 +0200 Message-Id: <20230918164714.3144984-12-xsimonar@redhat.com> In-Reply-To: <20230918164714.3144984-1-xsimonar@redhat.com> References: <20230918164714.3144984-1-xsimonar@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.8 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Subject: [ovs-dev] [PATCH ovn 11/15] tests: fixed "send gratuitous ARP for NAT rules on HA distributed router" 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" Fixes: 0c89c0fddb4f ("tests: fixed another flake in "send gratuitous ARP for NAT rules on HA distributed router"") Signed-off-by: Xavier Simonart --- tests/ovn.at | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/tests/ovn.at b/tests/ovn.at index 8ebf55580..d4e0016e5 100644 --- a/tests/ovn.at +++ b/tests/ovn.at @@ -13824,9 +13824,6 @@ AT_CHECK([grep $garp hv3_br_phys_tx | sort], [0], []) # at this point, we invert the priority of the gw chassis between hv2 and hv3 -# Reset hv2/br-phys_n1 before inverting gw chassis, as otherwise packets might -# be reset (while not resetting hv1/snoopvif because not yet sent). -as hv2 reset_pcap_file br-phys_n1 hv2/br-phys_n1 ovn-nbctl --wait=hv \ --id=@gc0 create Gateway_Chassis \ name=outside_gw1 chassis_name=hv2 priority=1 -- \ @@ -13834,6 +13831,11 @@ ovn-nbctl --wait=hv \ name=outside_gw2 chassis_name=hv3 priority=10 -- \ set Logical_Router_Port lrp0 'gateway_chassis=[@gc0,@gc1]' +# We expect not to receive garp on hv2 after inverting the priority. +# Hence reset hv2 after inverting priority as otherwise a garp might +# be received on hv2 between the reset and the priority change. + +as hv2 reset_pcap_file br-phys_n1 hv2/br-phys_n1 as hv3 reset_pcap_file br-phys_n1 hv3/br-phys_n1 as hv1 reset_pcap_file snoopvif hv1/snoopvif From patchwork Mon Sep 18 16:47:11 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Xavier Simonart X-Patchwork-Id: 1836330 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org 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=QYXNDDRy; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=openvswitch.org (client-ip=2605:bc80:3010::138; helo=smtp1.osuosl.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=patchwork.ozlabs.org) Received: from smtp1.osuosl.org (smtp1.osuosl.org [IPv6:2605:bc80:3010::138]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Rq9hV31H7z1ynr for ; Tue, 19 Sep 2023 02:47:54 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id 8698182181; Mon, 18 Sep 2023 16:47:49 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org 8698182181 Authentication-Results: smtp1.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=QYXNDDRy X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp1.osuosl.org ([127.0.0.1]) by localhost (smtp1.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id QDbka9QEVL2O; Mon, 18 Sep 2023 16:47:48 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by smtp1.osuosl.org (Postfix) with ESMTPS id A955B82176; Mon, 18 Sep 2023 16:47:47 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org A955B82176 Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id 79E69C007F; Mon, 18 Sep 2023 16:47:46 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@lists.linuxfoundation.org Received: from smtp3.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by lists.linuxfoundation.org (Postfix) with ESMTP id 2C7E0C0DD6 for ; Mon, 18 Sep 2023 16:47:43 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id 0FFB661554 for ; Mon, 18 Sep 2023 16:47:19 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org 0FFB661554 Authentication-Results: smtp3.osuosl.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=QYXNDDRy 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 noG9liXQcz7u for ; Mon, 18 Sep 2023 16:47:18 +0000 (UTC) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by smtp3.osuosl.org (Postfix) with ESMTPS id 541E66151F for ; Mon, 18 Sep 2023 16:47:18 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org 541E66151F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1695055637; 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=dnGhba8O6ZgLyPXCTHMooxJK6k8+CfJh+q6URDGo5fM=; b=QYXNDDRy+UfCnBMTego69VLiitWsNjfEih88Ft20YAsHIPG+mls0+hvf6Oo7ZlpYVfn9aO 81lKp9jrMFRV3Boi/bvOiJwUZB70N0wN93Vds60YKSlUuEk3CJJ7JJizn3g338bJmqnkX1 B1PMAiZkdpYFsHfcSX4eAKssKD1TQd0= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-259-ZHL79fYOPoOyZYg6MArbZA-1; Mon, 18 Sep 2023 12:47:16 -0400 X-MC-Unique: ZHL79fYOPoOyZYg6MArbZA-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.rdu2.redhat.com [10.11.54.8]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id CF040101A58B for ; Mon, 18 Sep 2023 16:47:15 +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 B5BA9C15BB8; Mon, 18 Sep 2023 16:47:15 +0000 (UTC) From: Xavier Simonart To: xsimonar@redhat.com, dev@openvswitch.org Date: Mon, 18 Sep 2023 18:47:11 +0200 Message-Id: <20230918164714.3144984-13-xsimonar@redhat.com> In-Reply-To: <20230918164714.3144984-1-xsimonar@redhat.com> References: <20230918164714.3144984-1-xsimonar@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.8 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Subject: [ovs-dev] [PATCH ovn 12/15] tests: fixed "SCTP Load balancer health checks"a 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" There is no guarantee that ovn-northd and not its 'backup' gets the lock. Hence we need to check both logs. Signed-off-by: Xavier Simonart --- tests/ovn.at | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/ovn.at b/tests/ovn.at index d4e0016e5..02c763593 100644 --- a/tests/ovn.at +++ b/tests/ovn.at @@ -25418,7 +25418,9 @@ check_row_count Service_Monitor 0 # Let's also be sure the warning message about SCTP load balancers is # is in the ovn-northd log -AT_CHECK([test 1 = `grep -c "SCTP load balancers do not currently support health checks" northd/NORTHD_TYPE.log`]) +cnt1=`grep -c "SCTP load balancers do not currently support health checks" northd/NORTHD_TYPE.log` +cnt2=`grep -c "SCTP load balancers do not currently support health checks" northd-backup/NORTHD_TYPE.log` +AT_CHECK([test 1 -le "$(($cnt1 + $cnt2))"]) AT_CLEANUP ]) From patchwork Mon Sep 18 16:47:12 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Xavier Simonart X-Patchwork-Id: 1836339 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org 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=R46ql1K/; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=openvswitch.org (client-ip=140.211.166.136; helo=smtp3.osuosl.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=patchwork.ozlabs.org) Received: from smtp3.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Rq9hy5ykTz1ync for ; Tue, 19 Sep 2023 02:48:18 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id 91A9A615AE; Mon, 18 Sep 2023 16:48:16 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org 91A9A615AE 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=R46ql1K/ 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 Hx0rNkn6n1zU; Mon, 18 Sep 2023 16:48:15 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by smtp3.osuosl.org (Postfix) with ESMTPS id 5D5F86156A; Mon, 18 Sep 2023 16:48:04 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org 5D5F86156A Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id 95035C0DEE; Mon, 18 Sep 2023 16:47:54 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@lists.linuxfoundation.org Received: from smtp4.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by lists.linuxfoundation.org (Postfix) with ESMTP id 1A61AC0DDC for ; Mon, 18 Sep 2023 16:47:48 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id C690640530 for ; Mon, 18 Sep 2023 16:47:20 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org C690640530 Authentication-Results: smtp4.osuosl.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=R46ql1K/ X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp4.osuosl.org ([127.0.0.1]) by localhost (smtp4.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 3aLFCbuUWHpk for ; Mon, 18 Sep 2023 16:47:19 +0000 (UTC) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by smtp4.osuosl.org (Postfix) with ESMTPS id 0054B41B1B for ; Mon, 18 Sep 2023 16:47:18 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org 0054B41B1B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1695055637; 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=kJz0/eMzzTrPIpj35fnY5mQ720CO95qlEjQ6AEwi+hw=; b=R46ql1K/yUdPNFWZcYeBrcKjG4cwH75HUql1224C8x4WPsUvHF5HvHlU+WKt//R4lIWMcW 7700tRWCv0prnAYe6xj+DXApKvTfzyKNnGbGtjrtQD6nR6lb1+JkMALXyArI+HdCNcFRr0 RbrqV5IqEEm/I/DI/TWTHGQo3F5ETkg= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-295-_gMOTC7GMBOHUslr3My3gQ-1; Mon, 18 Sep 2023 12:47:16 -0400 X-MC-Unique: _gMOTC7GMBOHUslr3My3gQ-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.rdu2.redhat.com [10.11.54.8]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id ECD371875053 for ; Mon, 18 Sep 2023 16:47:15 +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 D450CC15BB8; Mon, 18 Sep 2023 16:47:15 +0000 (UTC) From: Xavier Simonart To: xsimonar@redhat.com, dev@openvswitch.org Date: Mon, 18 Sep 2023 18:47:12 +0200 Message-Id: <20230918164714.3144984-14-xsimonar@redhat.com> In-Reply-To: <20230918164714.3144984-1-xsimonar@redhat.com> References: <20230918164714.3144984-1-xsimonar@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.8 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Subject: [ovs-dev] [PATCH ovn 13/15] tests: fixed "LSP incremental processing" 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" We might get less recomputes than expected: e.g. Port_Binding->chassis and Port_Binding->up might be received by northd within the same idl transaction. Signed-off-by: Xavier Simonart --- tests/ovn-northd.at | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/ovn-northd.at b/tests/ovn-northd.at index f51e29b11..abb425a8c 100644 --- a/tests/ovn-northd.at +++ b/tests/ovn-northd.at @@ -10010,13 +10010,13 @@ ovn_attach n1 br-phys 192.168.0.11 check_recompute_counter() { northd_recomp=$(as northd ovn-appctl -t NORTHD_TYPE inc-engine/show-stats northd recompute) - AT_CHECK([test x$northd_recomp = x$1]) + AT_CHECK([test $northd_recomp -le $1]) lflow_recomp=$(as northd ovn-appctl -t NORTHD_TYPE inc-engine/show-stats lflow recompute) - AT_CHECK([test x$lflow_recomp = x$2]) + AT_CHECK([test $lflow_recomp -le $2]) sync_sb_pb_recomp=$(as northd ovn-appctl -t NORTHD_TYPE inc-engine/show-stats sync_to_sb_pb recompute) - AT_CHECK([test x$sync_sb_pb_recomp = x$3]) + AT_CHECK([test $sync_sb_pb_recomp -le $3]) } check ovn-nbctl --wait=hv ls-add ls0 From patchwork Mon Sep 18 16:47:13 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Xavier Simonart X-Patchwork-Id: 1836338 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org 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=aNBA0/fg; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=openvswitch.org (client-ip=140.211.166.136; helo=smtp3.osuosl.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=patchwork.ozlabs.org) Received: from smtp3.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Rq9ht0sK1z1ync for ; Tue, 19 Sep 2023 02:48:14 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id D5EBE61504; Mon, 18 Sep 2023 16:48:11 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org D5EBE61504 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=aNBA0/fg 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 oMzXsRkvlzCB; Mon, 18 Sep 2023 16:48:09 +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 1A71961556; Mon, 18 Sep 2023 16:48:02 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org 1A71961556 Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id B3C6AC0DE9; Mon, 18 Sep 2023 16:47:53 +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 1A840C0DDE for ; Mon, 18 Sep 2023 16:47:48 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp2.osuosl.org (Postfix) with ESMTP id 9CED44151A for ; Mon, 18 Sep 2023 16:47:27 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org 9CED44151A 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=aNBA0/fg 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 Q4T_PwNzRM16 for ; Mon, 18 Sep 2023 16:47:26 +0000 (UTC) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by smtp2.osuosl.org (Postfix) with ESMTPS id B942941778 for ; Mon, 18 Sep 2023 16:47:18 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org B942941778 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1695055637; 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=NUZhmUAAcX6wO8zv2UVuOI+QZkQYEpCZzqIlTsN73hs=; b=aNBA0/fgVgdQ6EHiKQCsbVJeBmJcvbqm+CdO9GnqM4RSAPhYqCy+VO/V076jVBSMLkxjdK 6onkZM4i3EhKR+CwIgn2F6Bui0RuvKHwAc+YCDO89DyOJLwEZ4rnJ9660t9idTD4C9cbm0 yyqYVX6PYLUwnhjfVFCcOAfGVugX/dY= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-297-Nx1kDPbqOmqhdcRM7uyoEg-1; Mon, 18 Sep 2023 12:47:16 -0400 X-MC-Unique: Nx1kDPbqOmqhdcRM7uyoEg-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.rdu2.redhat.com [10.11.54.8]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 161CA811E88 for ; Mon, 18 Sep 2023 16:47:16 +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 F2085C15BB8; Mon, 18 Sep 2023 16:47:15 +0000 (UTC) From: Xavier Simonart To: xsimonar@redhat.com, dev@openvswitch.org Date: Mon, 18 Sep 2023 18:47:13 +0200 Message-Id: <20230918164714.3144984-15-xsimonar@redhat.com> In-Reply-To: <20230918164714.3144984-1-xsimonar@redhat.com> References: <20230918164714.3144984-1-xsimonar@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.8 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Subject: [ovs-dev] [PATCH ovn 14/15] tests: fixed "ipsec -- basic configuration" 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" Signed-off-by: Xavier Simonart --- tests/ovn-ipsec.at | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/ovn-ipsec.at b/tests/ovn-ipsec.at index 10ef97878..f8df8d60e 100644 --- a/tests/ovn-ipsec.at +++ b/tests/ovn-ipsec.at @@ -48,11 +48,11 @@ ovn-nbctl set nb_global . options:ipsec_encapsulation=true check ovn-nbctl --wait=hv sync -AT_CHECK([as hv2 ovs-vsctl get Interface ovn-hv1-0 options:remote_ip | tr -d '"\n'], [0], [192.168.0.1]) +OVS_WAIT_UNTIL([test x`as hv2 ovs-vsctl get Interface ovn-hv1-0 options:remote_ip | tr -d '"\n'` = x192.168.0.1]) AT_CHECK([as hv2 ovs-vsctl get Interface ovn-hv1-0 options:local_ip | tr -d '"\n'], [0], [192.168.0.2]) AT_CHECK([as hv2 ovs-vsctl get Interface ovn-hv1-0 options:remote_name | tr -d '\n'], [0], [hv1]) AT_CHECK([as hv2 ovs-vsctl get Interface ovn-hv1-0 options:ipsec_encapsulation | tr -d '\n'], [0], [yes]) -AT_CHECK([as hv1 ovs-vsctl get Interface ovn-hv2-0 options:remote_ip | tr -d '"\n'], [0], [192.168.0.2]) +OVS_WAIT_UNTIL([test x`as hv1 ovs-vsctl get Interface ovn-hv2-0 options:remote_ip | tr -d '"\n'` = x192.168.0.2]) AT_CHECK([as hv1 ovs-vsctl get Interface ovn-hv2-0 options:local_ip | tr -d '"\n'], [0], [192.168.0.1]) AT_CHECK([as hv1 ovs-vsctl get Interface ovn-hv2-0 options:remote_name | tr -d '\n'], [0], [hv2]) AT_CHECK([as hv1 ovs-vsctl get Interface ovn-hv2-0 options:ipsec_encapsulation | tr -d '\n'], [0], [yes]) From patchwork Mon Sep 18 16:47:14 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Xavier Simonart X-Patchwork-Id: 1836332 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org 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=EEXA7pqH; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=openvswitch.org (client-ip=2605:bc80:3010::133; helo=smtp2.osuosl.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=patchwork.ozlabs.org) Received: from smtp2.osuosl.org (smtp2.osuosl.org [IPv6:2605:bc80:3010::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Rq9hX4QqYz1ypc for ; Tue, 19 Sep 2023 02:47:56 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by smtp2.osuosl.org (Postfix) with ESMTP id 5CDF5417B9; Mon, 18 Sep 2023 16:47:54 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org 5CDF5417B9 Authentication-Results: smtp2.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=EEXA7pqH 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 MErXt8JY6syh; Mon, 18 Sep 2023 16:47:51 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [IPv6:2605:bc80:3010:104::8cd3:938]) by smtp2.osuosl.org (Postfix) with ESMTPS id 6042941767; Mon, 18 Sep 2023 16:47:49 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org 6042941767 Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id 5B872C0DD6; Mon, 18 Sep 2023 16:47:47 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@lists.linuxfoundation.org Received: from smtp1.osuosl.org (smtp1.osuosl.org [IPv6:2605:bc80:3010::138]) by lists.linuxfoundation.org (Postfix) with ESMTP id 4FD4DC0DD7 for ; Mon, 18 Sep 2023 16:47:43 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id 0819082136 for ; Mon, 18 Sep 2023 16:47:20 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org 0819082136 Authentication-Results: smtp1.osuosl.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=EEXA7pqH X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp1.osuosl.org ([127.0.0.1]) by localhost (smtp1.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id VRxVbq8rAhB6 for ; Mon, 18 Sep 2023 16:47:18 +0000 (UTC) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by smtp1.osuosl.org (Postfix) with ESMTPS id B465E82125 for ; Mon, 18 Sep 2023 16:47:18 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org B465E82125 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1695055637; 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=/Bba1AfQl5mpZpOSiupSuLreIQG+p6xbF2LxCgpeqCU=; b=EEXA7pqH+ZfrQ9vvvBvIY8jmTHZ9H27EB+4KWxxPeCShyXdcjgDO4z4ab/QK+1T1Rz4crg FGV+5HTGkg8r11Cv3Iw4PZlQ7uWk32ZUklFElxvOsH8FdDSFCliM6qfdf5MMMLmyejJ3Us U4OuEsVMnKEZ+vLfol4vAVYWcvv3+cM= Received: from mimecast-mx02.redhat.com (mx-ext.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-443-T6JVQyF5PDOyuocwtUMNKw-1; Mon, 18 Sep 2023 12:47:16 -0400 X-MC-Unique: T6JVQyF5PDOyuocwtUMNKw-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.rdu2.redhat.com [10.11.54.8]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 360D329A9D3E for ; Mon, 18 Sep 2023 16:47:16 +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 1C5CEC15BB8; Mon, 18 Sep 2023 16:47:16 +0000 (UTC) From: Xavier Simonart To: xsimonar@redhat.com, dev@openvswitch.org Date: Mon, 18 Sep 2023 18:47:14 +0200 Message-Id: <20230918164714.3144984-16-xsimonar@redhat.com> In-Reply-To: <20230918164714.3144984-1-xsimonar@redhat.com> References: <20230918164714.3144984-1-xsimonar@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.8 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Subject: [ovs-dev] [PATCH ovn 15/15] tests: do not start northd-backup for northd tests querying northd 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" At test startup, there is no guarantee that northd gets the lock instead of northd-backup. Some northd tests query northd using "as northd ovn-appctl -t ovn-northd ..". Hence those query might go to the inactive northd, and tests were randomly failing. Signed-off-by: Xavier Simonart --- tests/ovn-northd.at | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/tests/ovn-northd.at b/tests/ovn-northd.at index abb425a8c..4bded94c0 100644 --- a/tests/ovn-northd.at +++ b/tests/ovn-northd.at @@ -8928,7 +8928,7 @@ AT_CLEANUP OVN_FOR_EACH_NORTHD_NO_HV([ AT_SETUP([Address set incremental processing]) -ovn_start +ovn_start --backup-northd=none # Create a few resources. check ovn-nbctl ls-add sw0 @@ -8986,7 +8986,6 @@ grep -c mutate], [0], [2 # Pause ovn-northd and add/remove few addresses. when it is resumed # it should use mutate for updating the address sets. check as northd ovn-appctl -t NORTHD_TYPE pause -check as northd-backup ovn-appctl -t NORTHD_TYPE pause check as northd ovn-appctl -t NORTHD_TYPE inc-engine/clear-stats check ovn-nbctl add address_set $foo_as_uuid addresses 1.1.1.5 @@ -9033,7 +9032,7 @@ AT_CLEANUP OVN_FOR_EACH_NORTHD_NO_HV([ AT_SETUP([Port group incremental processing]) -ovn_start +ovn_start --backup-northd=none check ovn-nbctl ls-add sw1 \ -- lsp-add sw1 sw1.1 \ @@ -9687,7 +9686,7 @@ AT_CLEANUP OVN_FOR_EACH_NORTHD_NO_HV([ AT_SETUP([Chassis-feature compatibitility - remote chassis]) -ovn_start +ovn_start --backup-northd=none AS_BOX([Local chassis]) check ovn-sbctl chassis-add hv1 geneve 127.0.0.1 \ @@ -9979,7 +9978,7 @@ AT_CLEANUP # This test checks the compute/recompute stats of sync_to_sb_lb engine node OVN_FOR_EACH_NORTHD_NO_HV([ AT_SETUP([sync_to_sb_lb incremental processing]) -ovn_start +ovn_start --backup-northd=none check ovn-nbctl ls-add sw check ovn-nbctl lsp-add sw p1 @@ -10000,7 +9999,7 @@ AT_CLEANUP OVN_FOR_EACH_NORTHD_NO_HV([ AT_SETUP([LSP incremental processing]) -ovn_start +ovn_start --backup-northd=none net_add n1 sim_add hv1 @@ -10109,7 +10108,7 @@ AT_CLEANUP OVN_FOR_EACH_NORTHD_NO_HV([ AT_SETUP([LSP incremental processing with only router ports before and after adding a VIF]) -ovn_start +ovn_start --backup-northd=none check_recompute_counter() { northd_recomp=$(as northd ovn-appctl -t NORTHD_TYPE inc-engine/show-stats northd recompute) @@ -10151,7 +10150,7 @@ AT_CLEANUP OVN_FOR_EACH_NORTHD_NO_HV([ AT_SETUP([LSP incremental processing fallback to recompute]) -ovn_start +ovn_start --backup-northd=none net_add n1 sim_add hv1 @@ -10197,7 +10196,7 @@ AT_CLEANUP OVN_FOR_EACH_NORTHD_NO_HV([ AT_SETUP([ACL/Meter incremental processing - no northd recompute]) -ovn_start +ovn_start --backup-northd=none check_recompute_counter() { northd_recomp=$(as northd ovn-appctl -t NORTHD_TYPE inc-engine/show-stats northd recompute) @@ -10348,7 +10347,7 @@ AT_CLEANUP OVN_FOR_EACH_NORTHD_NO_HV([ AT_SETUP([Load balancer incremental processing]) -ovn_start +ovn_start --backup-northd=none check_engine_stats() { node=$1