From patchwork Tue May 31 09:33:18 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mohammad Heib X-Patchwork-Id: 1637277 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.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=DdA4ZsR0; dkim-atps=neutral Authentication-Results: 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=) 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 RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4LC6XV47jGz9s1l for ; Tue, 31 May 2022 19:33:30 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id 40D558406D; Tue, 31 May 2022 09:33:28 +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 zqXOOD5wuxKj; Tue, 31 May 2022 09:33:27 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by smtp1.osuosl.org (Postfix) with ESMTPS id 58C6F8176C; Tue, 31 May 2022 09:33:26 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id 239A9C0032; Tue, 31 May 2022 09:33:26 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@lists.linuxfoundation.org Received: from smtp1.osuosl.org (smtp1.osuosl.org [IPv6:2605:bc80:3010::138]) by lists.linuxfoundation.org (Postfix) with ESMTP id 50357C002D for ; Tue, 31 May 2022 09:33:25 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id 3146081A4E for ; Tue, 31 May 2022 09:33: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 kC2NYOdgyMf5 for ; Tue, 31 May 2022 09:33:24 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.8.0 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 622388176C for ; Tue, 31 May 2022 09:33:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1653989603; 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; bh=UDos+mge8E83WAOlrF1KnZC5z5140NTKDwh7SUT+otY=; b=DdA4ZsR0mH3hcS61x21tppwK8F5mltiZLB4p1+Oxm6wK+9v1XyFvIYUZ5X7zbPXK5Y41P1 qryfGqQFEWxs3Fk0CLDM4p0bcZpwW/x2qjoxZkpfUPH+6mwGMXoTN8vtYnSYkVNcEYbQyK EnllSTGjaYf/yRqenV5QD/UXbiSUbB4= Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-591-K0-pTfNiP3-jbAxmeqSw7A-1; Tue, 31 May 2022 05:33:22 -0400 X-MC-Unique: K0-pTfNiP3-jbAxmeqSw7A-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id CC8241C006A4 for ; Tue, 31 May 2022 09:33:21 +0000 (UTC) Received: from mheiblap.localdomain.com (unknown [10.35.206.236]) by smtp.corp.redhat.com (Postfix) with ESMTP id 037A02026985; Tue, 31 May 2022 09:33:20 +0000 (UTC) From: Mohammad Heib To: dev@openvswitch.org Date: Tue, 31 May 2022 12:33:18 +0300 Message-Id: <20220531093318.2270409-1-mheib@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.78 on 10.11.54.4 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=mheib@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Subject: [ovs-dev] [PATCH ovn v2] OVN-CI: Add test cases with monitor-all enabled. 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" currently ovn ci only has one test case with the option ovn-monitor-all enabled, this patch will add one more execution with option ovn-monitor-all=true for each test case that are wrapped by OVN_FOR_EACH_NORTHD macro. This will more or less double the number of test cases. It is possible to select a reduce set of test cases using -k "keywords". Keyword such as dp-groups=yes dp-groups=no parallelization=yes parallelization=no ovn-northd ovn-northd-ddlog ovn_monitor_all=yes can be used to select a range of tests, as title is searched as well. For instance, to run ovn-monitor-all tests, with dp-groups enabled and ddlog disabled: make check TESTSUITEFLAGS="-k dp-groups=yes,ovn_monitor_all=yes,\!ovn-northd-ddlog" Signed-off-by: Mohammad Heib --- tests/ovn-macros.at | 19 ++++++++++++++++--- tests/ovs-macros.at | 4 +++- 2 files changed, 19 insertions(+), 4 deletions(-) diff --git a/tests/ovn-macros.at b/tests/ovn-macros.at index c6f0f6251..7484b32c3 100644 --- a/tests/ovn-macros.at +++ b/tests/ovn-macros.at @@ -323,6 +323,19 @@ ovn_az_attach() { -- --may-exist add-br br-int \ -- set bridge br-int fail-mode=secure other-config:disable-in-band=true \ || return 1 + + # currently this is the optimal place to add the ovn-monitor-all=true option, + # this can be implemented in a different way by redefining the sim-add function + # to add the ovn-related external-ids when we add a new simulated node via sim-add. + # + # wait one sec to make sure that the ovn notice and update it configuration + # according to the new option. + # + if test X$OVN_MONITOR_ALL = Xyes; then + ovs-vsctl set open . external_ids:ovn-monitor-all=true + sleep 1 + fi + start_daemon ovn-controller --enable-dummy-vif-plug || return 1 } @@ -751,19 +764,19 @@ m4_define([OVN_FOR_EACH_NORTHD], [m4_foreach([NORTHD_TYPE], [ovn-northd, ovn-northd-ddlog], [m4_foreach([NORTHD_USE_DP_GROUPS], [yes, no], [m4_foreach([NORTHD_USE_PARALLELIZATION], [yes, no], [$1 -])])])]) +]) m4_foreach([OVN_MONITOR_ALL], [yes], [$1])])])]) # Some tests aren't prepared for dp groups to be enabled. m4_define([OVN_FOR_EACH_NORTHD_WITHOUT_DP_GROUPS], [m4_foreach([NORTHD_TYPE], [ovn-northd, ovn-northd-ddlog], [m4_foreach([NORTHD_USE_DP_GROUPS], [no], [m4_foreach([NORTHD_USE_PARALLELIZATION], [yes, no], [$1 -])])])]) +])m4_foreach([OVN_MONITOR_ALL], [yes], [$1])])])]) # Some tests aren't prepared for ddlog to be enabled. m4_define([OVN_FOR_EACH_NORTHD_WITHOUT_DDLOG], [m4_foreach([NORTHD_TYPE], [ovn-northd], [m4_foreach([NORTHD_USE_DP_GROUPS], [yes, no], [m4_foreach([NORTHD_USE_PARALLELIZATION], [yes, no], [$1 -])])])]) +])m4_foreach([OVN_MONITOR_ALL], [yes], [$1])])])]) diff --git a/tests/ovs-macros.at b/tests/ovs-macros.at index 0482b7f5b..5d6c3ada2 100644 --- a/tests/ovs-macros.at +++ b/tests/ovs-macros.at @@ -10,7 +10,7 @@ dnl set it as a shell variable as well. dnl - Skip the test if it's for ovn-northd-ddlog but it didn't get built. m4_rename([AT_SETUP], [OVS_AT_SETUP]) m4_define([AT_SETUP], - [OVS_AT_SETUP($@[]m4_ifdef([NORTHD_TYPE], [ -- NORTHD_TYPE])[]m4_ifdef([NORTHD_USE_DP_GROUPS], [ -- dp-groups=NORTHD_USE_DP_GROUPS])[]m4_ifdef([NORTHD_USE_PARALLELIZATION], [ -- parallelization=NORTHD_USE_PARALLELIZATION])) + [OVS_AT_SETUP($@[]m4_ifdef([NORTHD_TYPE], [ -- NORTHD_TYPE])[]m4_ifdef([NORTHD_USE_DP_GROUPS], [ -- dp-groups=NORTHD_USE_DP_GROUPS])[]m4_ifdef([NORTHD_USE_PARALLELIZATION], [ -- parallelization=NORTHD_USE_PARALLELIZATION])[]m4_ifdef([OVN_MONITOR_ALL], [ -- ovn_monitor_all=OVN_MONITOR_ALL])) m4_ifdef([NORTHD_TYPE], [[NORTHD_TYPE]=NORTHD_TYPE ])dnl m4_ifdef([NORTHD_USE_DP_GROUPS], [[NORTHD_USE_DP_GROUPS]=NORTHD_USE_DP_GROUPS @@ -19,6 +19,8 @@ m4_ifdef([NORTHD_USE_PARALLELIZATION], [[NORTHD_USE_PARALLELIZATION]=NORTHD_USE_ ])dnl m4_ifdef([NORTHD_DUMMY_NUMA], [[NORTHD_DUMMY_NUMA]=NORTHD_DUMMY_NUMA ])dnl +m4_ifdef([OVN_MONITOR_ALL], [[OVN_MONITOR_ALL]=OVN_MONITOR_ALL +])dnl m4_if(NORTHD_TYPE, [ovn-northd-ddlog], [dnl AT_SKIP_IF([test $TEST_DDLOG = no]) ])dnl