From patchwork Fri Jun 11 06:24:49 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Han Zhou X-Patchwork-Id: 1490775 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: 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=) 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 RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4G1W735f9vz9sWk for ; Fri, 11 Jun 2021 16:25:35 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id 09B844149E; Fri, 11 Jun 2021 06:25:32 +0000 (UTC) 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 pM4CvKbClobg; Fri, 11 Jun 2021 06:25:30 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [IPv6:2605:bc80:3010:104::8cd3:938]) by smtp4.osuosl.org (Postfix) with ESMTPS id A0AD640649; Fri, 11 Jun 2021 06:25:29 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id 9160AC0027; Fri, 11 Jun 2021 06:25:27 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@lists.linuxfoundation.org Received: from smtp1.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by lists.linuxfoundation.org (Postfix) with ESMTP id 26225C000B for ; Fri, 11 Jun 2021 06:25:25 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id 1552583B62 for ; Fri, 11 Jun 2021 06:25:25 +0000 (UTC) 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 9Jza3k6v-P5g for ; Fri, 11 Jun 2021 06:25:24 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.8.0 Received: from relay10.mail.gandi.net (relay10.mail.gandi.net [217.70.178.230]) by smtp1.osuosl.org (Postfix) with ESMTPS id BB2C98249B for ; Fri, 11 Jun 2021 06:25:23 +0000 (UTC) Received: (Authenticated sender: hzhou@ovn.org) by relay10.mail.gandi.net (Postfix) with ESMTPSA id 530BC240006; Fri, 11 Jun 2021 06:25:18 +0000 (UTC) From: Han Zhou To: dev@openvswitch.org Date: Thu, 10 Jun 2021 23:24:49 -0700 Message-Id: <20210611062452.362848-1-hzhou@ovn.org> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 Subject: [ovs-dev] [PATCH ovn 1/4] ovn-northd.at: Fix test "northd ssl file change -- ovn-northd-ddlog". 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" This test fails for ovn-northd-ddlog because of the RBAC role when using the SSL connection. RBAC is not the purpose of the test case, so this patch fixes it without enabling RBAC. Signed-off-by: Han Zhou Acked-by: Mark Michelson --- tests/ovn-northd.at | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/tests/ovn-northd.at b/tests/ovn-northd.at index 4692775ad..ad1732da3 100644 --- a/tests/ovn-northd.at +++ b/tests/ovn-northd.at @@ -3618,9 +3618,23 @@ ovn_start --backup-northd=none as northd OVS_APP_EXIT_AND_WAIT([NORTHD_TYPE]) +as ovn-sb +OVS_APP_EXIT_AND_WAIT([ovsdb-server]) + +key_server=testpki-test-privkey.pem +cert_server=testpki-test-cert.pem +cacert=testpki-cacert.pem + +cd ovn-sb +rm ovsdb-server.log +ssl_options="--remote=pssl:0:127.0.0.1 ovn-sb.db -p $PKIDIR/$key_server -c $PKIDIR/$cert_server -C $PKIDIR/$cacert" +AT_CHECK([ovsdb-server --detach --no-chdir --pidfile --log-file $ssl_options], [0], [], [stderr]) +on_exit "kill `cat ovsdb-server.pid`" +PARSE_LISTENING_PORT([ovsdb-server.log], [TCP_PORT]) +cd .. + key=testpki-hv1-privkey.pem cert=testpki-hv1-cert.pem -cacert=testpki-cacert.pem key2=testpki-hv2-privkey.pem cert3=testpki-hv3-cert.pem @@ -3629,8 +3643,9 @@ cert3=testpki-hv3-cert.pem cp $PKIDIR/$key2 $key cp $PKIDIR/$cert3 $cert cp $PKIDIR/$cacert $cacert +as northd start_daemon ovn$NORTHD_TYPE -vjsonrpc \ - --ovnnb-db=$OVN_NB_DB --ovnsb-db=$SSL_OVN_SB_DB \ + --ovnnb-db=$OVN_NB_DB --ovnsb-db=ssl:127.0.0.1:$TCP_PORT \ -p $key -c $cert -C $cacert # SSL should not connect because of key and cert mismatch From patchwork Fri Jun 11 06:24:50 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Han Zhou X-Patchwork-Id: 1490773 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=openvswitch.org (client-ip=2605:bc80:3010::136; helo=smtp3.osuosl.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=) Received: from smtp3.osuosl.org (smtp3.osuosl.org [IPv6:2605:bc80:3010::136]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4G1W6z29KLz9sWQ for ; Fri, 11 Jun 2021 16:25:31 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id A8FA360A9F; Fri, 11 Jun 2021 06:25:28 +0000 (UTC) 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 KKlStp0P0kiv; Fri, 11 Jun 2021 06:25:27 +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 EA0B660647; Fri, 11 Jun 2021 06:25:26 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id A57FBC000D; Fri, 11 Jun 2021 06:25:26 +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 A8255C000B for ; Fri, 11 Jun 2021 06:25:24 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp2.osuosl.org (Postfix) with ESMTP id 9774140231 for ; Fri, 11 Jun 2021 06:25:24 +0000 (UTC) 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 LntaKMxs1mwH for ; Fri, 11 Jun 2021 06:25:24 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.8.0 Received: from relay10.mail.gandi.net (relay10.mail.gandi.net [217.70.178.230]) by smtp2.osuosl.org (Postfix) with ESMTPS id C4C624017D for ; Fri, 11 Jun 2021 06:25:23 +0000 (UTC) Received: (Authenticated sender: hzhou@ovn.org) by relay10.mail.gandi.net (Postfix) with ESMTPSA id CF019240009; Fri, 11 Jun 2021 06:25:20 +0000 (UTC) From: Han Zhou To: dev@openvswitch.org Date: Thu, 10 Jun 2021 23:24:50 -0700 Message-Id: <20210611062452.362848-2-hzhou@ovn.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210611062452.362848-1-hzhou@ovn.org> References: <20210611062452.362848-1-hzhou@ovn.org> MIME-Version: 1.0 Subject: [ovs-dev] [PATCH ovn 2/4] ovn.at: Fix test "nb_cfg timestamp -- ovn-northd-ddlog". 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 case fails quite often because of timing. When nb_cfg_timestamp is updated in SB DB it may not be updated immediately in NB's hv_cfg_timestamp. This patch use "wait_column" to wait. Signed-off-by: Han Zhou Acked-by: Mark Michelson --- tests/ovn.at | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tests/ovn.at b/tests/ovn.at index 11a85c457..847c31de6 100644 --- a/tests/ovn.at +++ b/tests/ovn.at @@ -23952,8 +23952,7 @@ wait_row_count Chassis_Private 1 name=hv3 nb_cfg=2 get_cfg 4 hv3_ts=$(ovn-sbctl --bare --columns=nb_cfg_timestamp find chassis_private name=hv3) echo hv3_ts=$hv3_ts -hv_cfg_ts=$(ovn-nbctl get nb_global . hv_cfg_timestamp) -check test "$hv3_ts" = "$hvt4" +wait_column $hv3_ts nb:nb_global hv_cfg_timestamp AT_CHECK([test x$(ovn-nbctl --print-wait-time --wait=sb sync | grep ms | wc -l) = x2]) AT_CHECK([test x$(ovn-nbctl --print-wait-time --wait=hv sync | grep ms | wc -l) = x3]) From patchwork Fri Jun 11 06:24:51 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Han Zhou X-Patchwork-Id: 1490774 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: 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=) 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 RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4G1W733gFQz9sWX for ; Fri, 11 Jun 2021 16:25:35 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id B817C83BDE; Fri, 11 Jun 2021 06:25:32 +0000 (UTC) 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 DvUa8svUO7eS; Fri, 11 Jun 2021 06:25:31 +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 BB88183B69; Fri, 11 Jun 2021 06:25:30 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id 3D548C002B; Fri, 11 Jun 2021 06:25:28 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@lists.linuxfoundation.org Received: from smtp2.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by lists.linuxfoundation.org (Postfix) with ESMTP id EBE24C000B for ; Fri, 11 Jun 2021 06:25:25 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp2.osuosl.org (Postfix) with ESMTP id CE8D240231 for ; Fri, 11 Jun 2021 06:25:25 +0000 (UTC) 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 RwDwU28jmspJ for ; Fri, 11 Jun 2021 06:25:25 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.8.0 Received: from relay10.mail.gandi.net (relay10.mail.gandi.net [217.70.178.230]) by smtp2.osuosl.org (Postfix) with ESMTPS id D87FB4017D for ; Fri, 11 Jun 2021 06:25:24 +0000 (UTC) Received: (Authenticated sender: hzhou@ovn.org) by relay10.mail.gandi.net (Postfix) with ESMTPSA id 32B5724000B; Fri, 11 Jun 2021 06:25:21 +0000 (UTC) From: Han Zhou To: dev@openvswitch.org Date: Thu, 10 Jun 2021 23:24:51 -0700 Message-Id: <20210611062452.362848-3-hzhou@ovn.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210611062452.362848-1-hzhou@ovn.org> References: <20210611062452.362848-1-hzhou@ovn.org> MIME-Version: 1.0 Subject: [ovs-dev] [PATCH ovn 3/4] ovn.at: Fix test "No ovn-controller assert when generating conjunction flows -- ovn-northd-ddlog". 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 fails quite often for ddlog because of tunnel keys mismatch when checking OpenFlow dumps. It is possible to allocate different keys in different runs because multiple NB changes can be handled by northd in a single iteration - it fails more often in ddlog probably because there is some more latency for northd-ddlog to start processing the changes, but it doesn't affect correctness. So this patch fixes it by ignoring the tunnel keys when comparing the flows. Signed-off-by: Han Zhou Acked-by: Mark Michelson --- tests/ovn.at | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/tests/ovn.at b/tests/ovn.at index 847c31de6..b440f5517 100644 --- a/tests/ovn.at +++ b/tests/ovn.at @@ -25453,7 +25453,8 @@ check ovn-nbctl --wait=hv sync # Check OVS flows are installed properly. AT_CHECK([as hv1 ovs-ofctl dump-flows br-int table=44 | ofctl_strip_all | \ grep "priority=2002" | grep conjunction | \ - sed 's/conjunction([[^)]]*)/conjunction()/g' | sort], [0], [dnl + sed 's/conjunction([[^)]]*)/conjunction()/g' | \ + sed 's/reg15=0x[[1-9]]/reg15=0xN/g' | sort], [0], [dnl table=44, priority=2002,udp,reg0=0x100/0x100,metadata=0x1,nw_src=192.168.47.4,tp_dst=0x10/0xfff0 actions=conjunction() table=44, priority=2002,udp,reg0=0x100/0x100,metadata=0x1,nw_src=192.168.47.4,tp_dst=0x100/0xff00 actions=conjunction() table=44, priority=2002,udp,reg0=0x100/0x100,metadata=0x1,nw_src=192.168.47.4,tp_dst=0x1000/0xf000 actions=conjunction() @@ -25470,8 +25471,8 @@ AT_CHECK([as hv1 ovs-ofctl dump-flows br-int table=44 | ofctl_strip_all | \ table=44, priority=2002,udp,reg0=0x100/0x100,metadata=0x1,nw_src=192.168.47.4,tp_dst=0x800/0xf800 actions=conjunction() table=44, priority=2002,udp,reg0=0x100/0x100,metadata=0x1,nw_src=192.168.47.4,tp_dst=0x8000/0x8000 actions=conjunction() table=44, priority=2002,udp,reg0=0x100/0x100,metadata=0x1,nw_src=192.168.47.4,tp_dst=1 actions=conjunction() - table=44, priority=2002,udp,reg0=0x100/0x100,reg15=0x3,metadata=0x1,nw_src=192.168.47.4 actions=conjunction() - table=44, priority=2002,udp,reg0=0x100/0x100,reg15=0x4,metadata=0x1,nw_src=192.168.47.4 actions=conjunction() + table=44, priority=2002,udp,reg0=0x100/0x100,reg15=0xN,metadata=0x1,nw_src=192.168.47.4 actions=conjunction() + table=44, priority=2002,udp,reg0=0x100/0x100,reg15=0xN,metadata=0x1,nw_src=192.168.47.4 actions=conjunction() table=44, priority=2002,udp,reg0=0x80/0x80,metadata=0x1,nw_src=192.168.47.4,tp_dst=0x10/0xfff0 actions=conjunction() table=44, priority=2002,udp,reg0=0x80/0x80,metadata=0x1,nw_src=192.168.47.4,tp_dst=0x100/0xff00 actions=conjunction() table=44, priority=2002,udp,reg0=0x80/0x80,metadata=0x1,nw_src=192.168.47.4,tp_dst=0x1000/0xf000 actions=conjunction() @@ -25488,8 +25489,8 @@ AT_CHECK([as hv1 ovs-ofctl dump-flows br-int table=44 | ofctl_strip_all | \ table=44, priority=2002,udp,reg0=0x80/0x80,metadata=0x1,nw_src=192.168.47.4,tp_dst=0x800/0xf800 actions=conjunction() table=44, priority=2002,udp,reg0=0x80/0x80,metadata=0x1,nw_src=192.168.47.4,tp_dst=0x8000/0x8000 actions=conjunction() table=44, priority=2002,udp,reg0=0x80/0x80,metadata=0x1,nw_src=192.168.47.4,tp_dst=1 actions=conjunction() - table=44, priority=2002,udp,reg0=0x80/0x80,reg15=0x3,metadata=0x1,nw_src=192.168.47.4 actions=conjunction() - table=44, priority=2002,udp,reg0=0x80/0x80,reg15=0x4,metadata=0x1,nw_src=192.168.47.4 actions=conjunction() + table=44, priority=2002,udp,reg0=0x80/0x80,reg15=0xN,metadata=0x1,nw_src=192.168.47.4 actions=conjunction() + table=44, priority=2002,udp,reg0=0x80/0x80,reg15=0xN,metadata=0x1,nw_src=192.168.47.4 actions=conjunction() ]) OVN_CLEANUP([hv1]) From patchwork Fri Jun 11 06:24:52 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Han Zhou X-Patchwork-Id: 1490776 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: 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=) 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 RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4G1W7441dKz9sWQ for ; Fri, 11 Jun 2021 16:25:36 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by smtp2.osuosl.org (Postfix) with ESMTP id 2BB5A404BE; Fri, 11 Jun 2021 06:25:34 +0000 (UTC) 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 KDNinkbJYlsO; Fri, 11 Jun 2021 06:25:33 +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 32235404AB; Fri, 11 Jun 2021 06:25:32 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id 49D6AC002F; Fri, 11 Jun 2021 06:25:29 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@lists.linuxfoundation.org Received: from smtp1.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by lists.linuxfoundation.org (Postfix) with ESMTP id 22BBDC0023 for ; Fri, 11 Jun 2021 06:25:27 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id E346C83B62 for ; Fri, 11 Jun 2021 06:25:26 +0000 (UTC) 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 ROSqIJpIYDg7 for ; Fri, 11 Jun 2021 06:25:26 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.8.0 Received: from relay10.mail.gandi.net (relay10.mail.gandi.net [217.70.178.230]) by smtp1.osuosl.org (Postfix) with ESMTPS id 1CC0C8249B for ; Fri, 11 Jun 2021 06:25:25 +0000 (UTC) Received: (Authenticated sender: hzhou@ovn.org) by relay10.mail.gandi.net (Postfix) with ESMTPSA id 8CD6F24000D; Fri, 11 Jun 2021 06:25:23 +0000 (UTC) From: Han Zhou To: dev@openvswitch.org Date: Thu, 10 Jun 2021 23:24:52 -0700 Message-Id: <20210611062452.362848-4-hzhou@ovn.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210611062452.362848-1-hzhou@ovn.org> References: <20210611062452.362848-1-hzhou@ovn.org> MIME-Version: 1.0 Subject: [ovs-dev] [PATCH ovn 4/4] ovn.at: Fix test "virtual ports -- ovn-northd-ddlog". 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 case fails quite often for northd-ddlog because of the tunnel keys mismatch when comparing OpenFlow rules. Keys can change in different runs. This patch fixes it by extracting the expected keys from SB DB before comparison instead of hardcoding. Signed-off-by: Han Zhou --- tests/ovn.at | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/tests/ovn.at b/tests/ovn.at index b440f5517..67cf75719 100644 --- a/tests/ovn.at +++ b/tests/ovn.at @@ -17317,14 +17317,18 @@ logical_port=sw0-vir) = x], [0], []) check_virtual_offlows_present() { hv=$1 - AT_CHECK([as $hv ovs-ofctl dump-flows br-int table=44 | ofctl_strip_all | grep "priority=2000"], [0], [dnl - table=44, priority=2000,ip,metadata=0x1 actions=resubmit(,45) - table=44, priority=2000,ipv6,metadata=0x1 actions=resubmit(,45) + sw0_dp_key=$(fetch_column Datapath_Binding tunnel_key external_ids:name=sw0) + lr0_dp_key=$(fetch_column Datapath_Binding tunnel_key external_ids:name=lr0) + lr0_public_dp_key=$(fetch_column Port_Binding tunnel_key logical_port=lr0-public) + + AT_CHECK_UNQUOTED([as $hv ovs-ofctl dump-flows br-int table=44 | ofctl_strip_all | grep "priority=2000"], [0], [dnl + table=44, priority=2000,ip,metadata=0x$sw0_dp_key actions=resubmit(,45) + table=44, priority=2000,ipv6,metadata=0x$sw0_dp_key actions=resubmit(,45) ]) - AT_CHECK([as $hv ovs-ofctl dump-flows br-int table=11 | ofctl_strip_all | \ + AT_CHECK_UNQUOTED([as $hv ovs-ofctl dump-flows br-int table=11 | ofctl_strip_all | \ grep "priority=92" | grep 172.168.0.50], [0], [dnl - table=11, priority=92,arp,reg14=0x3,metadata=0x3,arp_tpa=172.168.0.50,arp_op=1 actions=move:NXM_OF_ETH_SRC[[]]->NXM_OF_ETH_DST[[]],mod_dl_src:10:54:00:00:00:10,load:0x2->NXM_OF_ARP_OP[[]],move:NXM_NX_ARP_SHA[[]]->NXM_NX_ARP_THA[[]],load:0x105400000010->NXM_NX_ARP_SHA[[]],push:NXM_OF_ARP_SPA[[]],push:NXM_OF_ARP_TPA[[]],pop:NXM_OF_ARP_SPA[[]],pop:NXM_OF_ARP_TPA[[]],move:NXM_NX_REG14[[]]->NXM_NX_REG15[[]],load:0x1->NXM_NX_REG10[[0]],resubmit(,37) + table=11, priority=92,arp,reg14=0x$lr0_public_dp_key,metadata=0x$lr0_dp_key,arp_tpa=172.168.0.50,arp_op=1 actions=move:NXM_OF_ETH_SRC[[]]->NXM_OF_ETH_DST[[]],mod_dl_src:10:54:00:00:00:10,load:0x2->NXM_OF_ARP_OP[[]],move:NXM_NX_ARP_SHA[[]]->NXM_NX_ARP_THA[[]],load:0x105400000010->NXM_NX_ARP_SHA[[]],push:NXM_OF_ARP_SPA[[]],push:NXM_OF_ARP_TPA[[]],pop:NXM_OF_ARP_SPA[[]],pop:NXM_OF_ARP_TPA[[]],move:NXM_NX_REG14[[]]->NXM_NX_REG15[[]],load:0x1->NXM_NX_REG10[[0]],resubmit(,37) ]) }