5f9769
From 4e143c1e58b18adf6914ec783ee4503a63dbf3a8 Mon Sep 17 00:00:00 2001
5f9769
From: Gongming Chen <gmingchen@tencent.com>
5f9769
Date: Sun, 7 Feb 2021 02:52:53 +0000
5f9769
Subject: [PATCH 4/4] tests: Fix Port_Binding up test.
5f9769
5f9769
After setting the iface-id, immediately check the up status of the port
5f9769
binding, it will occasionally fail, especially when the port binding
5f9769
status is reported later.
5f9769
5f9769
When it fails, the following will be output:
5f9769
Checking values in sb Port_Binding with logical_port=lsp1 against false... found false
5f9769
ovs-vsctl add-port br-int lsp1 -- set Interface lsp1 external-ids:iface-id=lsp1
5f9769
./ovn-macros.at:307: "$@"
5f9769
Checking values in sb Port_Binding with logical_port=lsp1 against true... found false
5f9769
_uuid               : 15ebabb6-3dbb-4806-aa85-d1c03e3b39f6
5f9769
logical_port        : lsp1
5f9769
up                  : true
5f9769
./ovn-macros.at:393: hard failure
5f9769
5f9769
Fixes: 4d3cb42b076b ("binding: Set Logical_Switch_Port.up when all OVS flows are installed.")
5f9769
Signed-off-by: Gongming Chen <gmingchen@tencent.com>
5f9769
Acked-by: Dumitru Ceara <dceara@redhat.com>
5f9769
Signed-off-by: Numan Siddique <numans@ovn.org>
5f9769
(cherry picked from upstream commit 44ea2ec88136f83e7eab9790473025b6c95bdcc0)
5f9769
5f9769
Change-Id: I53d1834cc6b59cc42b494661378d00bf722dc88a
5f9769
---
5f9769
 AUTHORS.rst  | 1 +
5f9769
 tests/ovn.at | 2 +-
5f9769
 2 files changed, 2 insertions(+), 1 deletion(-)
5f9769
5f9769
diff --git a/AUTHORS.rst b/AUTHORS.rst
5f9769
index 5d926c1..29c2c01 100644
5f9769
--- a/AUTHORS.rst
5f9769
+++ b/AUTHORS.rst
5f9769
@@ -155,6 +155,7 @@ Geoffrey Wossum                    gwossum@acm.org
5f9769
 Gianluca Merlo                     gianluca.merlo@gmail.com
5f9769
 Giuseppe Lettieri                  g.lettieri@iet.unipi.it
5f9769
 Glen Gibb                          grg@stanford.edu
5f9769
+Gongming Chen                      gmingchen@tencent.com
5f9769
 Guoshuai Li                        ligs@dtdream.com
5f9769
 Guolin Yang                        gyang@vmware.com
5f9769
 Guru Chaitanya Perakam             gperakam@Brocade.com
5f9769
diff --git a/tests/ovn.at b/tests/ovn.at
5f9769
index 2ef056b..9f2e152 100644
5f9769
--- a/tests/ovn.at
5f9769
+++ b/tests/ovn.at
5f9769
@@ -23700,7 +23700,7 @@ check ovn-nbctl --wait=hv sync
5f9769
 check_column "false" Port_Binding up logical_port=lsp1
5f9769
 
5f9769
 check ovs-vsctl add-port br-int lsp1 -- set Interface lsp1 external-ids:iface-id=lsp1
5f9769
-check_column "true" Port_Binding up logical_port=lsp1
5f9769
+wait_column "true" Port_Binding up logical_port=lsp1
5f9769
 wait_column "true" nb:Logical_Switch_Port up name=lsp1
5f9769
 OVS_WAIT_UNTIL([test `ovs-vsctl get Interface lsp1 external_ids:ovn-installed` = '"true"'])
5f9769
 
5f9769
-- 
5f9769
1.8.3.1
5f9769