From patchwork Mon Mar 14 08:25:56 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Xavier Simonart X-Patchwork-Id: 1604963 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=cQplmdii; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=openvswitch.org (client-ip=140.211.166.138; helo=smtp1.osuosl.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=) Received: from smtp1.osuosl.org (smtp1.osuosl.org [140.211.166.138]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4KH8ks6fxJz9sGJ for ; Mon, 14 Mar 2022 19:26:13 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id 887F883367; Mon, 14 Mar 2022 08:26:11 +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 eQuq48N8poal; Mon, 14 Mar 2022 08:26:10 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [IPv6:2605:bc80:3010:104::8cd3:938]) by smtp1.osuosl.org (Postfix) with ESMTPS id 8758F827BB; Mon, 14 Mar 2022 08:26:09 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id 5966DC0033; Mon, 14 Mar 2022 08:26:09 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@lists.linuxfoundation.org Received: from smtp4.osuosl.org (smtp4.osuosl.org [IPv6:2605:bc80:3010::137]) by lists.linuxfoundation.org (Postfix) with ESMTP id 64E6BC0012 for ; Mon, 14 Mar 2022 08:26:08 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id 4E3F9414CE for ; Mon, 14 Mar 2022 08:26:08 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Authentication-Results: smtp4.osuosl.org (amavisd-new); dkim=pass (1024-bit key) header.d=redhat.com Received: from smtp4.osuosl.org ([127.0.0.1]) by localhost (smtp4.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id b7cXOtRYytix for ; Mon, 14 Mar 2022 08:26:04 +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 smtp4.osuosl.org (Postfix) with ESMTPS id 8981A414C3 for ; Mon, 14 Mar 2022 08:25:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1647246358; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=AmwOVIbBpT9+spuHn/M6A/y6jQYcZSml/s8WRzMMgXM=; b=cQplmdiiUpbCvlSy/wv1hsjMkQkYcASiSiGOM5Oi9KVwFFiOXjL32uI8CyCLZs2wQAM6gl ERDPUInKjBcdaQOPz/HSqcVzaoJ2jGD3v+y+gCBWA83PV2VbGCTaIgLT9niudsZ1tNCzkT EmsP1YIBeQ8dZ2JmgEcBBXVQrWokQDA= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-349-Zdl7LRfTOAyvpolgsFk-dw-1; Mon, 14 Mar 2022 04:25:57 -0400 X-MC-Unique: Zdl7LRfTOAyvpolgsFk-dw-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id D9DC285A5A8 for ; Mon, 14 Mar 2022 08:25:56 +0000 (UTC) Received: from wsfd-netdev90.ntdv.lab.eng.bos.redhat.com (wsfd-netdev90.ntdv.lab.eng.bos.redhat.com [10.19.188.196]) by smtp.corp.redhat.com (Postfix) with ESMTP id C0DDC40470F6; Mon, 14 Mar 2022 08:25:56 +0000 (UTC) From: Xavier Simonart To: xsimonar@redhat.com, dev@openvswitch.org Date: Mon, 14 Mar 2022 04:25:56 -0400 Message-Id: <20220314082556.4035411-1-xsimonar@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.11.54.2 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=xsimonar@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Subject: [ovs-dev] [PATCH ovn] Added test cases with ovn-northd parallelization 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" 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 can be used to select a range of tests, as title is searched as well. For instance, to run ovn-parallelization tests, with dp-groups enabled and ddlog disabled: make check TESTSUITEFLAGS="-k dp-groups=yes,parallelization=yes,\!ovn-northd-ddlog" A few additional notes - Do not use "ovn-northd" as a keyword, or the result might be different than expected. Even tough ovn-northd is added in all titles for the non ddlog tests, ovn-northd is also added in title of some other tests, for both ddlog and non ddlog (e.g. "check ovn-northd and ovn-controller version pinning"). - Running tests for both parallelization=yes and parallelization=no will not run all tests as some tests are not run through OVN_FOR_EACH_NORTHD. Instead use for instance make check TESTSUITEFLAGS="-k parallelization=yes" and make check TESTSUITEFLAGS="-k \!parallelization=yes" to run all tests If less than four physical cores are available, then 1 socket/four cores dummy-numa is used to excercice parallel northd Signed-off-by: Xavier Simonart Acked-by: Numan Siddique --- tests/ovn-macros.at | 17 ++++++++++++++--- tests/ovs-macros.at | 6 +++++- 2 files changed, 19 insertions(+), 4 deletions(-) diff --git a/tests/ovn-macros.at b/tests/ovn-macros.at index 91d2dafc8..d78315c75 100644 --- a/tests/ovn-macros.at +++ b/tests/ovn-macros.at @@ -171,7 +171,7 @@ ovn_start_northd() { esac if test X$NORTHD_DUMMY_NUMA = Xyes; then - northd_args="$northd_args --dummy-numa=\"0,0,1,1\"" + northd_args="$northd_args --dummy-numa=\"0,0,0,0\"" fi local name=${d_prefix}northd${suffix} @@ -749,12 +749,23 @@ OVS_END_SHELL_HELPERS m4_define([OVN_POPULATE_ARP], [AT_CHECK(ovn_populate_arp__, [0], [ignore])]) +# Use --dummy-numa if system has low cores and we want to force parallelization +m4_define([NORTHD_DUMMY_NUMA], + [$(if test $(nproc) -lt 4 && test NORTHD_USE_PARALLELIZATION = yes + then + echo "yes" + else + echo "no" + fi) +]) + # Defines a versions of a test with all combinations of northd and # datapath groups. m4_define([OVN_FOR_EACH_NORTHD], [m4_foreach([NORTHD_TYPE], [ovn-northd, ovn-northd-ddlog], - [m4_foreach([NORTHD_USE_DP_GROUPS], [yes, no], [$1 -])])]) + [m4_foreach([NORTHD_USE_DP_GROUPS], [yes, no], + [m4_foreach([NORTHD_USE_PARALLELIZATION], [yes, no], [$1 +])])])]) # Some tests aren't prepared for dp groups to be enabled. m4_define([OVN_FOR_EACH_NORTHD_WITHOUT_DP_GROUPS], diff --git a/tests/ovs-macros.at b/tests/ovs-macros.at index 634c205a8..0482b7f5b 100644 --- a/tests/ovs-macros.at +++ b/tests/ovs-macros.at @@ -10,11 +10,15 @@ 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])) + [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([NORTHD_TYPE], [[NORTHD_TYPE]=NORTHD_TYPE ])dnl m4_ifdef([NORTHD_USE_DP_GROUPS], [[NORTHD_USE_DP_GROUPS]=NORTHD_USE_DP_GROUPS ])dnl +m4_ifdef([NORTHD_USE_PARALLELIZATION], [[NORTHD_USE_PARALLELIZATION]=NORTHD_USE_PARALLELIZATION +])dnl +m4_ifdef([NORTHD_DUMMY_NUMA], [[NORTHD_DUMMY_NUMA]=NORTHD_DUMMY_NUMA +])dnl m4_if(NORTHD_TYPE, [ovn-northd-ddlog], [dnl AT_SKIP_IF([test $TEST_DDLOG = no]) ])dnl