From patchwork Fri Dec 2 13:51:37 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Xavier Simonart X-Patchwork-Id: 1711418 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=openvswitch.org (client-ip=2605:bc80:3010::137; helo=smtp4.osuosl.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=FzV/ejwQ; dkim-atps=neutral Received: from smtp4.osuosl.org (smtp4.osuosl.org [IPv6:2605:bc80:3010::137]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4NNvWW00MQz23mf for ; Sat, 3 Dec 2022 00:52:06 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id D30C241D36; Fri, 2 Dec 2022 13:52:04 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org D30C241D36 Authentication-Results: smtp4.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=FzV/ejwQ 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 Bm50pu1AvI5Q; Fri, 2 Dec 2022 13:52:03 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by smtp4.osuosl.org (Postfix) with ESMTPS id 510D941C87; Fri, 2 Dec 2022 13:51:58 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org 510D941C87 Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id C1ECBC009B; Fri, 2 Dec 2022 13:51: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 0C739C0082 for ; Fri, 2 Dec 2022 13:51:43 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id 9871F821B8 for ; Fri, 2 Dec 2022 13:51:41 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org 9871F821B8 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=FzV/ejwQ 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 ue_dzhRCK_4M for ; Fri, 2 Dec 2022 13:51:41 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.8.0 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org CD8D4821AF 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 CD8D4821AF for ; Fri, 2 Dec 2022 13:51:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1669989099; 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=SzPIvtvij3Uu9eMGNS0kkfQzh8YvU5tI784Kv1a3ZGs=; b=FzV/ejwQk3nLgqheZQk9oZRZXv6es6uU86cctrqPvC8FwYerG6QmjmFG8z8yM3/9D7ZLiD qYkNl4mCxQVTtadKqI0Rq6JcfPo7VyxrKqTsEYs8gKhnZnh4zdt/hcka31EFiNQlz0zgre XRfD8gISeSVeKSAoYLSCspCIXq9OS10= Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-648-wnssaa2JP2Sufce4vkL5Mw-1; Fri, 02 Dec 2022 08:51:39 -0500 X-MC-Unique: wnssaa2JP2Sufce4vkL5Mw-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id C52B63C0DDCF for ; Fri, 2 Dec 2022 13:51:38 +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 AE83C111E3FA; Fri, 2 Dec 2022 13:51:38 +0000 (UTC) From: Xavier Simonart To: xsimonar@redhat.com, dev@openvswitch.org Date: Fri, 2 Dec 2022 08:51:37 -0500 Message-Id: <20221202135137.1728564-13-xsimonar@redhat.com> In-Reply-To: <20221202135137.1728564-1-xsimonar@redhat.com> References: <20221202135137.1728564-1-xsimonar@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.3 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Subject: [ovs-dev] [PATCH ovn 12/12] tests: Fixed "IPv6 periodic RA" and "snat-ct-zone with common NAT zone" 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" "snat-ct-zone with common NAT zone" was not updated after the last change in table number. In addition, those tests were unexpectedly exiting before the end of the test,but reported success. Fixes: d3926b433e44 ("northd: rely on new actions for lb affinity") Signed-off-by: Xavier Simonart --- tests/ovn.at | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/tests/ovn.at b/tests/ovn.at index 93b79a7bd..5a8cd92d1 100644 --- a/tests/ovn.at +++ b/tests/ovn.at @@ -15712,7 +15712,6 @@ echo "Now test Route Info option" ovn-nbctl --wait=hv set Logical_Router_port ro-sw ipv6_ra_configs:route_info="HIGH-aef1::11/48,LOW-aef2::11/96" route_info=18023008ffffffffaef100000000000018036018ffffffffaef20000000000000000000000000000 ra_test 000005dc 08 $dns_addr $dnssl $route_info c0 40 aef00000000000000000000000000000 30 fd0f0000000000000000000000000000 -exit 0 echo "Test a different address mode now" ovn-nbctl --wait=hv set Logical_Router_Port ro-sw ipv6_ra_configs:address_mode=dhcpv6_stateful ra_test 000005dc 88 $dns_addr $dnssl $route_info 80 40 aef00000000000000000000000000000 30 fd0f0000000000000000000000000000 @@ -32531,10 +32530,9 @@ check ovn-nbctl lr-nat-add lr0 snat 172.16.0.2 10.0.0.0/24 check ovn-nbctl lr-nat-add lr0 dnat 172.16.0.2 10.0.0.2 check ovn-nbctl --wait=hv sync - # Use constants so that if tables or registers change, this test can # be updated easily. -DNAT_TABLE=14 +DNAT_TABLE=15 SNAT_TABLE=43 DNAT_ZONE_REG="NXM_NX_REG11[[0..15]]" SNAT_ZONE_REG="NXM_NX_REG12[[0..15]]" @@ -32542,9 +32540,14 @@ SNAT_ZONE_REG="NXM_NX_REG12[[0..15]]" lr0_dp_key=$(printf "%x" $(fetch_column Datapath_Binding tunnel_key external_ids:name=lr0)) dnat_zone=$(ovs-ofctl dump-flows br-int table=$DNAT_TABLE,metadata=0x${lr0_dp_key} | grep "nw_dst=172.16.0.2" | grep -o zone=.*, | cut -d '=' -f 2) -dnat_zone=${dnat_zone::-1} +if test -n "$dnat_zone"; then + dnat_zone=${dnat_zone::-1} +fi snat_zone=$(ovs-ofctl dump-flows br-int table=$SNAT_TABLE,metadata=0x${lr0_dp_key} | grep priority=153 | grep -o zone=.*, | cut -d '=' -f 2) -snat_zone=${snat_zone::-1} +if test -n "$snat_zone"; then + snat_zone=${snat_zone::-1} +fi +echo d="$dnat_zone" s="$snat_zone" "$DNAT_ZONE_REG" "$DNAT_ZONE_REG" # For now, we expect that the common zone is the dnat zone @@ -32554,9 +32557,13 @@ check test "$snat_zone" = "$DNAT_ZONE_REG" check ovn-nbctl --wait=hv set logical_router lr0 options:snat-ct-zone=666 dnat_zone=$(ovs-ofctl dump-flows br-int table=$DNAT_TABLE,metadata=0x${lr0_dp_key} | grep "nw_dst=172.16.0.2" | grep -o zone=.*, | cut -d '=' -f 2) -dnat_zone=${dnat_zone::-1} +if test -n "$dnat_zone"; then + dnat_zone=${dnat_zone::-1} +fi snat_zone=$(ovs-ofctl dump-flows br-int table=$SNAT_TABLE,metadata=0x${lr0_dp_key} | grep priority=153 | grep -o zone=.*, | cut -d '=' -f 2) -snat_zone=${snat_zone::-1} +if test -n "$snat_zone"; then + snat_zone=${snat_zone::-1} +fi # Now with an snat-ct-zone set, the common zone is the snat zone