From patchwork Wed Apr 15 09:10:25 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anton Ivanov X-Patchwork-Id: 1271023 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.137; helo=fraxinus.osuosl.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=cambridgegreys.com Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 492GmT1s6gz9s71 for ; Wed, 15 Apr 2020 19:10:48 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 7BFE685F6E; Wed, 15 Apr 2020 09:10:45 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id U0NjHLg0sdDv; Wed, 15 Apr 2020 09:10:43 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by fraxinus.osuosl.org (Postfix) with ESMTP id 0DFDA85F3A; Wed, 15 Apr 2020 09:10:43 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id F32B9C1AE2; Wed, 15 Apr 2020 09:10:42 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@lists.linuxfoundation.org Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by lists.linuxfoundation.org (Postfix) with ESMTP id 8D73DC0172 for ; Wed, 15 Apr 2020 09:10:41 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 7520B8701E for ; Wed, 15 Apr 2020 09:10:41 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id n1vuTbj847Bs for ; Wed, 15 Apr 2020 09:10:40 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from www.kot-begemot.co.uk (ivanoab7.miniserver.com [37.128.132.42]) by whitealder.osuosl.org (Postfix) with ESMTPS id 46B9884770 for ; Wed, 15 Apr 2020 09:10:40 +0000 (UTC) Received: from tun252.jain.kot-begemot.co.uk ([192.168.18.6] helo=jain.kot-begemot.co.uk) by www.kot-begemot.co.uk with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jOe45-0004XI-9c for dev@openvswitch.org; Wed, 15 Apr 2020 09:10:37 +0000 Received: from jain.kot-begemot.co.uk ([192.168.3.3]) by jain.kot-begemot.co.uk with esmtp (Exim 4.92) (envelope-from ) id 1jOe3y-0000MP-45; Wed, 15 Apr 2020 10:10:34 +0100 From: anton.ivanov@cambridgegreys.com To: dev@openvswitch.org Date: Wed, 15 Apr 2020 10:10:25 +0100 Message-Id: <20200415091025.1134-1-anton.ivanov@cambridgegreys.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 X-Clacks-Overhead: GNU Terry Pratchett Cc: Anton Ivanov Subject: [ovs-dev] [PATCH] Fix race condition in test 121 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" From: Anton Ivanov Test 121 was configuring the interface with test traffic before the LSP was configured. As a result, test traffic could be processed before the LSP was set resulting in a test failure Signed-off-by: Anton Ivanov --- tests/ovn.at | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/tests/ovn.at b/tests/ovn.at index 9a44f0a6f..cf6956cdd 100644 --- a/tests/ovn.at +++ b/tests/ovn.at @@ -9318,6 +9318,7 @@ OVN_CHECK_PACKETS([hv3/vif1-tx.pcap], [hv3-vif1.expected]) # Now add bridge-mappings on hv2, which should make everything work as hv2 ovs-vsctl set open . external-ids:ovn-bridge-mappings=phys:br-phys +sleep 1 # Wait until the patch ports are created in hv2 to connect br-int to br-phys OVS_WAIT_UNTIL([test 1 = `as hv2 ovs-vsctl show | \ @@ -17356,11 +17357,6 @@ ovs-vsctl add-br br-phys ovs-vsctl set open . external-ids:ovn-bridge-mappings=phys:br-phys ovn_attach n1 br-phys 192.168.0.1 -ovs-vsctl add-port br-int vif11 -- \ - set Interface vif11 external-ids:iface-id=lp11 \ - options:tx_pcap=hv1/vif11-tx.pcap \ - options:rxq_pcap=hv1/vif11-rx.pcap \ - ofport-request=11 lsp_name=lp11 @@ -17368,6 +17364,12 @@ ovn-nbctl lsp-add ls1 lp11 ovn-nbctl lsp-set-addresses lp11 "f0:00:00:00:00:11" ovn-nbctl lsp-set-port-security lp11 f0:00:00:00:00:11 +ovs-vsctl add-port br-int vif11 -- \ + set Interface vif11 external-ids:iface-id=lp11 \ + options:tx_pcap=hv1/vif11-tx.pcap \ + options:rxq_pcap=hv1/vif11-rx.pcap \ + ofport-request=11 + OVS_WAIT_UNTIL([test x`ovn-nbctl lsp-get-up lp11` = xup]) ovn-nbctl --wait=sb sync