From patchwork Mon Oct 14 10:10:43 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Xavier Simonart X-Patchwork-Id: 1996773 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org 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=Djs5o6at; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=openvswitch.org (client-ip=2605:bc80:3010::138; helo=smtp1.osuosl.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=patchwork.ozlabs.org) Received: from smtp1.osuosl.org (smtp1.osuosl.org [IPv6:2605:bc80:3010::138]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4XRtKb4Dtyz1xvK for ; Mon, 14 Oct 2024 21:10:59 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id 8C459810B0; Mon, 14 Oct 2024 10:10:57 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp1.osuosl.org ([127.0.0.1]) by localhost (smtp1.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id SW2MVPNumiTf; Mon, 14 Oct 2024 10:10:56 +0000 (UTC) X-Comment: SPF check N/A for local connections - client-ip=2605:bc80:3010:104::8cd3:938; helo=lists.linuxfoundation.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver= DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org 6A8E080F59 Authentication-Results: smtp1.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=Djs5o6at Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [IPv6:2605:bc80:3010:104::8cd3:938]) by smtp1.osuosl.org (Postfix) with ESMTPS id 6A8E080F59; Mon, 14 Oct 2024 10:10:56 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id A08ACC08B4; Mon, 14 Oct 2024 10:10:55 +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 26C97C08A3 for ; Mon, 14 Oct 2024 10:10:54 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id 0961480F59 for ; Mon, 14 Oct 2024 10:10:54 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp1.osuosl.org ([127.0.0.1]) by localhost (smtp1.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id n74N1-FGYMtb for ; Mon, 14 Oct 2024 10:10:53 +0000 (UTC) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=170.10.129.124; helo=us-smtp-delivery-124.mimecast.com; envelope-from=xsimonar@redhat.com; receiver= DMARC-Filter: OpenDMARC Filter v1.4.2 smtp1.osuosl.org 26B1680E76 Authentication-Results: smtp1.osuosl.org; dmarc=pass (p=none dis=none) header.from=redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org 26B1680E76 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by smtp1.osuosl.org (Postfix) with ESMTPS id 26B1680E76 for ; Mon, 14 Oct 2024 10:10:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1728900652; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=h2Vkf0ISejCuiiqHqyrzmAq7vvl3IZZG8CowbBz8EHE=; b=Djs5o6atduZAEvrPZImy9E9C6HwPcdVmcskOI7lNgu0KyHW21dGWAwGQblD0mYl/3N56Wg f7ENRb3B9fir2d+TpGCHf6adB5qkc7KcZqGDrTvOSpF2IWQmDzbSJR3OajWPW7DhvwnWhm JLiVBvdOFrVChe4i0grvbjR97CuLKZ4= Received: from mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-631-4npoKKvsPAinPEm_ly-enA-1; Mon, 14 Oct 2024 06:10:50 -0400 X-MC-Unique: 4npoKKvsPAinPEm_ly-enA-1 Received: from mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.17]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 1F67D1955F41 for ; Mon, 14 Oct 2024 10:10:50 +0000 (UTC) Received: from wsfd-netdev90.ntdv.lab.eng.bos.redhat.com (wsfd-netdev90.anl.eng.rdu2.dc.redhat.com [10.6.38.135]) by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 6FC8E1955E93; Mon, 14 Oct 2024 10:10:49 +0000 (UTC) From: Xavier Simonart To: xsimonar@redhat.com, dev@openvswitch.org Date: Mon, 14 Oct 2024 12:10:43 +0200 Message-Id: <20241014101046.3309426-3-xsimonar@redhat.com> In-Reply-To: <20241014101046.3309426-1-xsimonar@redhat.com> References: <20240830082814.1802264-3-xsimonar@redhat.com> <20241014101046.3309426-1-xsimonar@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.17 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Subject: [ovs-dev] [PATCH ovn v2 2/5] tests: Fix macros waiting for flows. X-BeenThere: ovs-dev@openvswitch.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ovs-dev-bounces@openvswitch.org Sender: "dev" Those macros were, in some cases, returning before the proper flows were installed, for instance when no ofport was yet created. Hence tests might sometimes have been flaky. This also highlited an issue in a test which also got fixed. Signed-off-by: Xavier Simonart --- tests/ovn-macros.at | 6 +++--- tests/ovn.at | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/ovn-macros.at b/tests/ovn-macros.at index 0f9a3ab09..caa89ab47 100644 --- a/tests/ovn-macros.at +++ b/tests/ovn-macros.at @@ -109,7 +109,7 @@ m4_divert_text([PREPARE_TESTS], OVS_WAIT_UNTIL([ hv_patch_ofport=$(as $hv ovs-vsctl --bare --columns ofport find Interface name=$patch_port) echo "$patch_port=$hv_patch_ofport" - test 1 -le $(as $hv ovs-ofctl dump-flows br-int | grep -c "output:\b$hv_patch_ofport\b") + test -n "$hv_patch_ofport" && test 1 -le $(as $hv ovs-ofctl dump-flows br-int | grep -c "output:\b$hv_patch_ofport\b") ]) done done @@ -123,7 +123,7 @@ m4_divert_text([PREPARE_TESTS], OVS_WAIT_UNTIL([ ofport=$(as $hv1 ovs-vsctl --bare --columns ofport find Interface name=ovn-${hv2}-0) echo "tunnel port=$ofport" - test 1 -le $(as $hv1 ovs-ofctl dump-flows br-int | grep -c "output:$ofport") + test -n "$ofport" && test 1 -le $(as $hv1 ovs-ofctl dump-flows br-int | grep -c "output:$ofport") ]) } @@ -135,7 +135,7 @@ m4_divert_text([PREPARE_TESTS], OVS_WAIT_UNTIL([ ofport=$(as $hv1 ovs-vsctl --bare --columns ofport find Interface name=ovn-${hv2}-0) echo "tunnel port=$ofport" - test 1 -le $(as $hv1 ovs-ofctl dump-flows br-int | grep -c "in_port=$ofport") + test -n "$ofport" && test 1 -le $(as $hv1 ovs-ofctl dump-flows br-int | grep -c "in_port=$ofport") ]) } diff --git a/tests/ovn.at b/tests/ovn.at index e3c25be53..a82e152b4 100644 --- a/tests/ovn.at +++ b/tests/ovn.at @@ -15361,8 +15361,8 @@ OVN_WAIT_PATCH_PORT_FLOWS(["public"], ["hv1"]) OVN_WAIT_PATCH_PORT_FLOWS(["public"], ["hv2"]) OVN_WAIT_REMOTE_OUTPUT_FLOWS(["hv1"],["hv2"]) OVN_WAIT_REMOTE_OUTPUT_FLOWS(["hv2"],["hv1"]) -OVN_WAIT_REMOTE_OUTPUT_FLOWS(["hv3"],[hv1"]) -OVN_WAIT_REMOTE_OUTPUT_FLOWS(["hv3"],[hv2"]) +OVN_WAIT_REMOTE_OUTPUT_FLOWS(["hv3"],["hv1"]) +OVN_WAIT_REMOTE_OUTPUT_FLOWS(["hv3"],["hv2"]) wait_column "$hv1_uuid" Port_Binding chassis logical_port=migrator wait_column "$hv1_uuid" Port_Binding requested_chassis logical_port=migrator