From patchwork Thu Feb 18 19:51:09 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ben Pfaff X-Patchwork-Id: 1441857 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=hemlock.osuosl.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=) Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4DhQM92ZBJz9sBy for ; Fri, 19 Feb 2021 06:51:33 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id A83E78743A; Thu, 18 Feb 2021 19:51:31 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id EiCecm7dpWbq; Thu, 18 Feb 2021 19:51:28 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by hemlock.osuosl.org (Postfix) with ESMTP id D082287425; Thu, 18 Feb 2021 19:51:28 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id ACDD5C000E; Thu, 18 Feb 2021 19:51:28 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@lists.linuxfoundation.org Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by lists.linuxfoundation.org (Postfix) with ESMTP id 223EFC000D for ; Thu, 18 Feb 2021 19:51:27 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id E645A8741C for ; Thu, 18 Feb 2021 19:51:26 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 827iRwU6D0tF for ; Thu, 18 Feb 2021 19:51:26 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from relay8-d.mail.gandi.net (relay8-d.mail.gandi.net [217.70.183.201]) by hemlock.osuosl.org (Postfix) with ESMTPS id A8CBD87404 for ; Thu, 18 Feb 2021 19:51:25 +0000 (UTC) X-Originating-IP: 75.54.222.30 Received: from sigfpe.attlocal.net (75-54-222-30.lightspeed.rdcyca.sbcglobal.net [75.54.222.30]) (Authenticated sender: blp@ovn.org) by relay8-d.mail.gandi.net (Postfix) with ESMTPSA id 620291BF205; Thu, 18 Feb 2021 19:51:23 +0000 (UTC) From: Ben Pfaff To: dev@openvswitch.org Date: Thu, 18 Feb 2021 11:51:09 -0800 Message-Id: <20210218195112.1391467-4-blp@ovn.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20210218195112.1391467-1-blp@ovn.org> References: <20210218195112.1391467-1-blp@ovn.org> MIME-Version: 1.0 Cc: Ben Pfaff Subject: [ovs-dev] [PATCH ovn v10.1 3/6] tests: Wait for updates in "check BFD config propagation to BFD" test. 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" Otherwise this test is racy because it assumes that northd finishes its updates between the ovn-nbctl changes and the subsequent checks. Also, simplify some series of "check_column" into single "check_row_count" calls (that then become "wait_row_count"). Signed-off-by: Ben Pfaff --- tests/ovn-northd.at | 44 ++++++++++++++------------------------------ 1 file changed, 14 insertions(+), 30 deletions(-) diff --git a/tests/ovn-northd.at b/tests/ovn-northd.at index e4fceff037a8..1a941efe9b5c 100644 --- a/tests/ovn-northd.at +++ b/tests/ovn-northd.at @@ -2463,55 +2463,39 @@ ovn-nbctl create bfd logical_port=r0-sw2 dst_ip=192.168.20.2 status=down min_tx= ovn-nbctl create bfd logical_port=r0-sw3 dst_ip=192.168.30.2 status=down ovn-nbctl create bfd logical_port=r0-sw4 dst_ip=192.168.40.2 status=down min_tx=0 detect_mult=0 -check_column 10 bfd detect_mult logical_port=r0-sw1 -check_column "192.168.10.2" bfd dst_ip logical_port=r0-sw1 -check_column 250 bfd min_rx logical_port=r0-sw1 -check_column 250 bfd min_tx logical_port=r0-sw1 -check_column admin_down bfd status logical_port=r0-sw1 - -check_column 20 bfd detect_mult logical_port=r0-sw2 -check_column "192.168.20.2" bfd dst_ip logical_port=r0-sw2 -check_column 500 bfd min_rx logical_port=r0-sw2 -check_column 500 bfd min_tx logical_port=r0-sw2 -check_column admin_down bfd status logical_port=r0-sw2 - -check_column 5 bfd detect_mult logical_port=r0-sw3 -check_column "192.168.30.2" bfd dst_ip logical_port=r0-sw3 -check_column 1000 bfd min_rx logical_port=r0-sw3 -check_column 1000 bfd min_tx logical_port=r0-sw3 -check_column admin_down bfd status logical_port=r0-sw3 +wait_row_count bfd 1 logical_port=r0-sw1 detect_mult=10 dst_ip=192.168.10.2 \ + min_rx=250 min_tx=250 status=admin_down +wait_row_count bfd 1 logical_port=r0-sw2 detect_mult=20 dst_ip=192.168.20.2 \ + min_rx=500 min_tx=500 status=admin_down +wait_row_count bfd 1 logical_port=r0-sw3 detect_mult=5 dst_ip=192.168.30.2 \ + min_rx=1000 min_tx=1000 status=admin_down uuid=$(fetch_column nb:bfd _uuid logical_port=r0-sw1) -check ovn-nbctl set bfd $uuid min_tx=1000 -check ovn-nbctl set bfd $uuid min_rx=1000 -check ovn-nbctl set bfd $uuid detect_mult=100 +check ovn-nbctl set bfd $uuid min_tx=1000 min_rx=1000 detect_mult=100 uuid_2=$(fetch_column nb:bfd _uuid logical_port=r0-sw2) check ovn-nbctl clear bfd $uuid_2 min_rx -check_column 1000 bfd min_rx logical_port=r0-sw2 - -check_column 1000 bfd min_tx logical_port=r0-sw1 -check_column 1000 bfd min_rx logical_port=r0-sw1 -check_column 100 bfd detect_mult logical_port=r0-sw1 +wait_row_count bfd 1 logical_port=r0-sw2 min_rx=1000 +wait_row_count bfd 1 logical_port=r0-sw1 min_rx=1000 min_tx=1000 detect_mult=100 check ovn-nbctl --bfd=$uuid lr-route-add r0 100.0.0.0/8 192.168.10.2 -check_column down bfd status logical_port=r0-sw1 +wait_column down bfd status logical_port=r0-sw1 AT_CHECK([ovn-nbctl lr-route-list r0 | grep 192.168.10.2 | grep -q bfd],[0]) check ovn-nbctl --bfd lr-route-add r0 200.0.0.0/8 192.168.20.2 -check_column down bfd status logical_port=r0-sw2 +wait_column down bfd status logical_port=r0-sw2 AT_CHECK([ovn-nbctl lr-route-list r0 | grep 192.168.20.2 | grep -q bfd],[0]) check ovn-nbctl --bfd lr-route-add r0 240.0.0.0/8 192.168.50.2 r0-sw5 -check_column down bfd status logical_port=r0-sw5 +wait_column down bfd status logical_port=r0-sw5 AT_CHECK([ovn-nbctl lr-route-list r0 | grep 192.168.50.2 | grep -q bfd],[0]) route_uuid=$(fetch_column nb:logical_router_static_route _uuid ip_prefix="100.0.0.0/8") check ovn-nbctl clear logical_router_static_route $route_uuid bfd -check_column admin_down bfd status logical_port=r0-sw1 +wait_column admin_down bfd status logical_port=r0-sw1 ovn-nbctl destroy bfd $uuid -check_row_count bfd 3 +wait_row_count bfd 3 AT_CLEANUP ])