From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 7B059A0C41; Tue, 19 Oct 2021 16:46:51 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 48B53411DC; Tue, 19 Oct 2021 16:46:51 +0200 (CEST) Received: from EUR04-VI1-obe.outbound.protection.outlook.com (mail-eopbgr80084.outbound.protection.outlook.com [40.107.8.84]) by mails.dpdk.org (Postfix) with ESMTP id C3C474119E for ; Tue, 19 Oct 2021 16:46:50 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=V/bkk3fw5w1w6I0BcwwYFjEQRre60eNT2s8h8FQf/60=; b=inoAzfG7djsmz2fECrHL66vddg0CENchlU8Egz+ujTVPPt1koWWEh3m9KW+m7M8APUHiNVXvdRBgFaClkqfpwmYbS9oNcunTFALL0bq2PD2Opp35yd8sjnPxXCTVYH3uUAnircXeAxUt0+z57cA7by8C1QjIfQlGfdP8lq0ZTd0= Received: from AS9PR04CA0041.eurprd04.prod.outlook.com (2603:10a6:20b:46a::30) by AM6PR08MB4053.eurprd08.prod.outlook.com (2603:10a6:20b:ab::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4608.18; Tue, 19 Oct 2021 14:46:48 +0000 Received: from AM5EUR03FT033.eop-EUR03.prod.protection.outlook.com (2603:10a6:20b:46a:cafe::b2) by AS9PR04CA0041.outlook.office365.com (2603:10a6:20b:46a::30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4608.14 via Frontend Transport; Tue, 19 Oct 2021 14:46:48 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 63.35.35.123) smtp.mailfrom=arm.com; dpdk.org; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com;dpdk.org; dmarc=pass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 63.35.35.123 as permitted sender) receiver=protection.outlook.com; client-ip=63.35.35.123; helo=64aa7808-outbound-1.mta.getcheckrecipient.com; Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by AM5EUR03FT033.mail.protection.outlook.com (10.152.16.99) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4608.15 via Frontend Transport; Tue, 19 Oct 2021 14:46:48 +0000 Received: ("Tessian outbound a8bfe25d7364:v103"); Tue, 19 Oct 2021 14:46:47 +0000 X-CR-MTA-TID: 64aa7808 Received: from 85a6b66c501a.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 405B1BF7-6706-4350-BEE9-4A4BD6A9100F.1; Tue, 19 Oct 2021 14:46:42 +0000 Received: from EUR01-DB5-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 85a6b66c501a.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Tue, 19 Oct 2021 14:46:42 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=HVB+fRLpKG4PuTPvGkJn38CowvLDFf2O2oxIm9yCnT3LRUfFljaCd7X53NsgX1GmrEhk2ey1oU5Fdz8nepk8NddxvKm2VDVQ/15kK3x8BMyt6pkKUynaU32yW19Ep4nWkTgNhH6YkdVkxkmloiQ4rOCzqsXYGVqIsBMkLxYXUkvTYLngA3FDOauxXCzyaqjS4iPWMljhU3opnxmDddhy33Ya3W/tKkiQkT+1RdFahIvk4ctFj4yWsCZ31DqslqLdupMWFa9XErgEi5UXVRTKmOn5evez1wG5AB46mpc8xkPwF8xCq0YMo1v4NMwMP+kAoWgVhYfclJJjhE2SAs6yWQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=V/bkk3fw5w1w6I0BcwwYFjEQRre60eNT2s8h8FQf/60=; b=Sz9VA1NhuEt4A2waK5YIdnnwPk3jxgUpQGZnDSZdxtvFxekGxzbVJ+RnisnKTdFFHBTE/aoIimJJPK5oHcXDlqTu8z3HABuKnE9/DJPSEATush8nqdhtal6lytg8/L1NI+I6ZXCSaH04uU156f1yNp5ONiGRfsPkvZZHwF3e/qVW5yTPKGvOLhgpZ6/7wFQgLx9XnUdFmbX+Oz+IzAGosSGmUe5ARmc5US8Ei+CiP7CUWUdPS0Pam0JjPbtiV3A8m6TUBOVK/X075mnWwaAn9+pEsOP1n75PbjJeyiyvTMphw0PNhvaJYSHiGwn0IYQm/DTPkcgbN14GQZfdhxgNZQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=V/bkk3fw5w1w6I0BcwwYFjEQRre60eNT2s8h8FQf/60=; b=inoAzfG7djsmz2fECrHL66vddg0CENchlU8Egz+ujTVPPt1koWWEh3m9KW+m7M8APUHiNVXvdRBgFaClkqfpwmYbS9oNcunTFALL0bq2PD2Opp35yd8sjnPxXCTVYH3uUAnircXeAxUt0+z57cA7by8C1QjIfQlGfdP8lq0ZTd0= Received: from DBAPR08MB5814.eurprd08.prod.outlook.com (2603:10a6:10:1b1::6) by DBBPR08MB4283.eurprd08.prod.outlook.com (2603:10a6:10:c3::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4608.18; Tue, 19 Oct 2021 14:46:41 +0000 Received: from DBAPR08MB5814.eurprd08.prod.outlook.com ([fe80::8501:86ca:a393:17b7]) by DBAPR08MB5814.eurprd08.prod.outlook.com ([fe80::8501:86ca:a393:17b7%9]) with mapi id 15.20.4608.018; Tue, 19 Oct 2021 14:46:40 +0000 From: Honnappa Nagarahalli To: David Marchand , "dev@dpdk.org" CC: "aconole@redhat.com" , "blo@iol.unh.edu" , "bruce.richardson@intel.com" , nd , Honnappa Nagarahalli , nd Thread-Topic: [dpdk-dev] [PATCH v2] test: rely on EAL detection for core list Thread-Index: AQHXxNxYwrG8ytXkKEW/GhXbwaDim6vaZS0g Date: Tue, 19 Oct 2021 14:46:40 +0000 Message-ID: References: <20211018170136.5189-1-david.marchand@redhat.com> <20211019112602.17782-1-david.marchand@redhat.com> In-Reply-To: <20211019112602.17782-1-david.marchand@redhat.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ts-tracking-id: 820B4F8F731322488A4C3E6BCE863F60.0 x-checkrecipientchecked: true Authentication-Results-Original: redhat.com; dkim=none (message not signed) header.d=none;redhat.com; dmarc=none action=none header.from=arm.com; x-ms-publictraffictype: Email X-MS-Office365-Filtering-Correlation-Id: e4b1a4d7-a63b-45f7-551a-08d9930f4767 x-ms-traffictypediagnostic: DBBPR08MB4283:|AM6PR08MB4053: x-ms-exchange-transport-forked: True X-Microsoft-Antispam-PRVS: x-checkrecipientrouted: true nodisclaimer: true x-ms-oob-tlc-oobclassifiers: OLM:8882;OLM:8882; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: oHgCQ3o0vj9owFNJ+WbMwASjgWjgrbbAn8O2XPsMwofbOQrgmiqHH3leT6p4PlsVs9fbzXibjngVYwrw3+O92kC0JPxYPeCKNCila4tws0rwT0HJmEJL7ZBpOknviwzx0SiDCOjAhTebBCQfoQhTd1L0tkfZj52dld9uIj2R3hgqiLCyzWm1yjDol0CQOU54uO9T9RqQ1UtJuEhinJd6Pzj3qa2u0zdMonMPO5Qyxu/TVwzKoQHibIxLZaC0YQojGkNddGQx0dxdExHxU6IaOk1XECXQiX3kRq6iYZypcWrTPcMnChxiQRLtuwmB2Koi/392xy5Vpsj98dcEKALKJSotDDWggWPLfAaxEzNtgczQWfF82lnPMKEP4OZugLhod13OxrxYMUtvMS6c7NGR+OgaxrwhxFQTYNLDXJzsDz7DbFQYp1fma4tPyrH6pJnsPx/IpcDmKDQCl70rqn0YRgGMoEhzNoiwPxPR0PGYpNcvZZJMdrmxu37D5HlZTxXLniNN3coilXyBoa5tU8VQQIV9eUydLJzjCG+/lwhLr7SlYN4AjsqEDKmYd+j/QXyd8zk46nOjKK/EEimpgsPs2lbTlchSeLVvWZxf9Ye/KKD1cUKfG4F2sslXlcbuA4pBM/Ufv+wtVcnBcreHoCziQIROLXrkR5AKFfujK6Yn+3dCUSAPK+rQOwaLCuFS31zSylZEW1+GAAzUJ4ke/c0j1g== X-Forefront-Antispam-Report-Untrusted: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DBAPR08MB5814.eurprd08.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(366004)(38070700005)(110136005)(6506007)(66946007)(54906003)(55016002)(5660300002)(66476007)(86362001)(76116006)(71200400001)(8676002)(66446008)(52536014)(7696005)(122000001)(186003)(33656002)(508600001)(66556008)(64756008)(83380400001)(4326008)(2906002)(38100700002)(316002)(9686003)(26005)(8936002); DIR:OUT; SFP:1101; Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DBBPR08MB4283 Original-Authentication-Results: redhat.com; dkim=none (message not signed) header.d=none;redhat.com; dmarc=none action=none header.from=arm.com; X-EOPAttributedMessage: 0 X-MS-Exchange-Transport-CrossTenantHeadersStripped: AM5EUR03FT033.eop-EUR03.prod.protection.outlook.com X-MS-Office365-Filtering-Correlation-Id-Prvs: 0f01004a-078c-4215-6e8d-08d9930f431c X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: ZYpHFbcxrDgEq5t6dCNSIIpBrPbIIPXt/nhcdCGWgzPM70eXuWHnquj/df6K8Sebryzk94DDgQTiycy1dHv2L6NMiEszQ7zFxIw9eioVeUrThK3J5EldgdOgY+gGNKVdSNiTrf8bOUK6MrvIhTf3gWVpb8RLU6LdgTy54vILgqtEBfLXSYEifuJDzZpCwcgeogGnRcKCaYPCDWo1Zt/usniia6Cvl+krXG67CZI+s27YYU0WcrJRYvmqk3GgmhYyYLcuiPiH+RM3AAHSOfigC8Z7ByAZh2Gw4lOowpZF0gUUoa0WT4TYV6VazDZJShuzAenvmk9lfqnVDS5xJqmz6OPXVqxViIygWsfnBOkBU+kVbbhTnD+M1yynWJ4Z9WHUPTSnUKuVtA6iuEzMQQopI2FEFUUr8NyTVvG6HevX32+Ytby++sRxXwQMTuH8EoMlvbnBnOqZ/ENBhZrffIncUi0QD74LZVcwMWqOGPMOpbuM8DAKh7xwxF1cNfdHpDk9Mfn5qfbtIQ6hCgSVZoxNSFqCx0pc0sfmsjYa5Ul6lHzIgCQTz+0wDKqWuFffHpTkteImK6OAKZlag5M192UCf93NwDjKMSOZpfW5g8brY/Sx4rsXKQji/iJc3D6ndqQqdhcw9bmZrwhLXs6NXal2gDLPSi9KKp//MsEMa0pPeiIgm7rtGQ/ke0EJ+4rp6PnbUlrGHi9zOEKXEEltZJgPzQ== X-Forefront-Antispam-Report: CIP:63.35.35.123; CTRY:IE; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:64aa7808-outbound-1.mta.getcheckrecipient.com; PTR:ec2-63-35-35-123.eu-west-1.compute.amazonaws.com; CAT:NONE; SFS:(4636009)(46966006)(36840700001)(9686003)(33656002)(55016002)(70586007)(6506007)(110136005)(8676002)(8936002)(81166007)(7696005)(316002)(54906003)(70206006)(82310400003)(83380400001)(47076005)(5660300002)(26005)(36860700001)(2906002)(356005)(508600001)(4326008)(336012)(52536014)(86362001)(186003); DIR:OUT; SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Oct 2021 14:46:48.0782 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: e4b1a4d7-a63b-45f7-551a-08d9930f4767 X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=f34e5979-57d9-4aaa-ad4d-b122a662184d; Ip=[63.35.35.123]; Helo=[64aa7808-outbound-1.mta.getcheckrecipient.com] X-MS-Exchange-CrossTenant-AuthSource: AM5EUR03FT033.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR08MB4053 Subject: Re: [dpdk-dev] [PATCH v2] test: rely on EAL detection for core list X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" >=20 > Cores count has a direct impact on the time needed to complete unit tests= . We also need to control the number of iterations with in the tests. We could add something like "-i low/medium/high". The test cases then can u= se this to decide on how many iterations to run. >=20 > Currently, the core list used for unit test is enforced to "all cores on = the > system" with no way for (CI) users to adapt it. > On the other hand, EAL default behavior (when no -c/-l option gets passed= ) is > to start threads on as many cores available in the process cpu affinity. >=20 > Remove logic from meson: users can then select where to run the tests by > either running meson with a custom cpu affinity (using taskset/cpuset > depending on OS) or by passing a --test-args option to meson. >=20 > Example: > $ sudo meson test -C build --suite fast-tests -t 3 --test-args "-l 0-3" >=20 > Signed-off-by: David Marchand > --- > Changes since v1: > - updated documentation, >=20 > --- > app/test/get-coremask.sh | 13 ------------- > app/test/meson.build | 10 +--------- > doc/guides/prog_guide/meson_ut.rst | 17 ++++++++++++++++- > 3 files changed, 17 insertions(+), 23 deletions(-) delete mode 100755 > app/test/get-coremask.sh >=20 > diff --git a/app/test/get-coremask.sh b/app/test/get-coremask.sh deleted = file > mode 100755 index bb8cf404d2..0000000000 > --- a/app/test/get-coremask.sh > +++ /dev/null > @@ -1,13 +0,0 @@ > -#! /bin/sh -e > -# SPDX-License-Identifier: BSD-3-Clause -# Copyright(c) 2019 Intel > Corporation > - > -if [ "$(uname)" =3D "Linux" ] ; then > - cat /sys/devices/system/cpu/present > -elif [ "$(uname)" =3D "FreeBSD" ] ; then > - ncpus=3D$(/sbin/sysctl -n hw.ncpu) > - echo 0-$(expr $ncpus - 1) > -else > -# fallback > - echo 0-3 > -fi > diff --git a/app/test/meson.build b/app/test/meson.build index > a16374b7a1..c7b377d52d 100644 > --- a/app/test/meson.build > +++ b/app/test/meson.build > @@ -463,13 +463,8 @@ message('hugepage availability: > @0@'.format(has_hugepage)) timeout_seconds =3D 600 timeout_seconds_fast > =3D 10 >=20 > -get_coremask =3D find_program('get-coremask.sh') -num_cores_arg =3D '-l = ' + > run_command(get_coremask).stdout().strip() > - > -default_test_args =3D [num_cores_arg] > - > foreach arg : fast_tests > - test_args =3D default_test_args > + test_args =3D [] > run_test =3D true > if not has_hugepage > if arg[1] > @@ -502,7 +497,6 @@ endforeach > foreach arg : perf_test_names > test(arg, dpdk_test, > env : ['DPDK_TEST=3D' + arg], > - args : default_test_args, > timeout : timeout_seconds, > is_parallel : false, > suite : 'perf-tests') > @@ -511,7 +505,6 @@ endforeach > foreach arg : driver_test_names > test(arg, dpdk_test, > env : ['DPDK_TEST=3D' + arg], > - args : default_test_args, > timeout : timeout_seconds, > is_parallel : false, > suite : 'driver-tests') > @@ -520,7 +513,6 @@ endforeach > foreach arg : dump_test_names > test(arg, dpdk_test, > env : ['DPDK_TEST=3D' + arg], > - args : default_test_args, > timeout : timeout_seconds, > is_parallel : false, > suite : 'debug-tests') > diff --git a/doc/guides/prog_guide/meson_ut.rst > b/doc/guides/prog_guide/meson_ut.rst > index fff88655dd..78cf3f845c 100644 > --- a/doc/guides/prog_guide/meson_ut.rst > +++ b/doc/guides/prog_guide/meson_ut.rst > @@ -37,6 +37,14 @@ command:: >=20 > $ meson test --suite fast-tests >=20 > +If desired, additional arguments can be passed to the test run via the > +meson ``--test-args`` option. > +For example, tests will by default run on as many available cores as is > +needed for the test, starting with the lowest number core - generally co= re 0. > +To run the fast-tests suite using only cores 8 through 16, one can use:: > + > + $ meson test --suite fast-tests --test-args=3D"-l 8-16" > + > The meson command to list all available tests:: >=20 > $ meson test --list > @@ -47,9 +55,16 @@ Arguments of ``test()`` that can be provided in > meson.build are as below: >=20 > * ``is_parallel`` is used to run test case either in parallel or non-par= allel mode. > * ``timeout`` is used to specify the timeout of test case. > -* ``args`` is used to specify test specific parameters. > +* ``args`` is used to specify test specific parameters (see note below). > * ``env`` is used to specify test specific environment parameters. >=20 > +Note: the content of meson ``--test-args`` option and the content of > +``args`` are appended when invoking the DPDK test binary. > +Because of this, it is recommended not to set any default coremask or > +memory configuration in per test ``args`` and rather let users select > +what best fits their environment. If a test can't run, then it should > +be skipped, as described below. > + >=20 > Dealing with skipped test cases > ------------------------------- > -- > 2.23.0