From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by dpdk.space (Postfix) with ESMTP id C9017A0096 for ; Fri, 7 Jun 2019 22:54:54 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 607641BC07; Fri, 7 Jun 2019 22:54:53 +0200 (CEST) Received: from EUR02-HE1-obe.outbound.protection.outlook.com (mail-eopbgr10043.outbound.protection.outlook.com [40.107.1.43]) by dpdk.org (Postfix) with ESMTP id E4B781BBEF for ; Fri, 7 Jun 2019 22:54:51 +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=wbg8Xx9GQVjzzRbOeWIW/r0Rx82yV65kpcTuUoyrhCw=; b=gMW+/PrljMxvP2vwL54QrqvwZAjkKP8l7Kk5yWWyTkj9N0jpbAmv066IXguU0kh/ntJ6dzQlCBwE7HkuB9jSUMpFmA7RFNJqMS2pQGnFeo19Z1sHjh1Z7nKxmPLPcLtrw+HChCVXHFl/4+VGCh0JsjK/zp9dG2NOZCWq8Z9uJ+I= Received: from VE1PR08MB5149.eurprd08.prod.outlook.com (20.179.30.152) by VE1PR08MB5072.eurprd08.prod.outlook.com (20.179.29.150) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1965.15; Fri, 7 Jun 2019 20:54:49 +0000 Received: from VE1PR08MB5149.eurprd08.prod.outlook.com ([fe80::9983:2882:a24:c0b0]) by VE1PR08MB5149.eurprd08.prod.outlook.com ([fe80::9983:2882:a24:c0b0%5]) with mapi id 15.20.1965.011; Fri, 7 Jun 2019 20:54:49 +0000 From: Honnappa Nagarahalli To: David Marchand , "dev@dpdk.org" CC: "thomas@monjalon.net" , "aconole@redhat.com" , "msantana@redhat.com" , Fiona Trahe , Pablo de Lara , Ashish Gupta , Declan Doherty , David Hunt , Erik Gabriel Carrillo , "jerinj@marvell.com" , Olivier Matz , Andrew Rybchenko , Anatoly Burakov , Bruce Richardson , Vladimir Medvedkin , Yipeng Wang , Sameh Gobriel , Konstantin Ananyev , Bernard Iremonger , Harry van Haaren , Gage Eads , Robert Sanford , Honnappa Nagarahalli , nd , nd Thread-Topic: [PATCH 14/14] test: skip tests when missing requirements Thread-Index: AQHVGrQXDE4fsqd7XUeVu3UAEdQ3LaaQrnpg Date: Fri, 7 Jun 2019 20:54:48 +0000 Message-ID: References: <1559638792-8608-1-git-send-email-david.marchand@redhat.com> <1559638792-8608-15-git-send-email-david.marchand@redhat.com> In-Reply-To: <1559638792-8608-15-git-send-email-david.marchand@redhat.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ts-tracking-id: 0ced8946-1335-43d4-8520-78b47d17fdb4.0 x-checkrecipientchecked: true authentication-results: spf=none (sender IP is ) smtp.mailfrom=Honnappa.Nagarahalli@arm.com; x-originating-ip: [217.140.111.135] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 1765f0a5-f11e-40a9-797c-08d6eb8a6154 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600148)(711020)(4605104)(1401327)(4618075)(2017052603328)(7193020); SRVR:VE1PR08MB5072; x-ms-traffictypediagnostic: VE1PR08MB5072: x-ld-processed: f34e5979-57d9-4aaa-ad4d-b122a662184d,ExtAddr nodisclaimer: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:8273; x-forefront-prvs: 0061C35778 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(376002)(346002)(39860400002)(366004)(136003)(396003)(189003)(199004)(71200400001)(71190400001)(54906003)(110136005)(73956011)(478600001)(7416002)(66946007)(66476007)(66556008)(64756008)(66446008)(9686003)(7736002)(476003)(8936002)(8676002)(66066001)(316002)(446003)(305945005)(55016002)(11346002)(486006)(3846002)(81156014)(6116002)(86362001)(2906002)(25786009)(81166006)(256004)(6506007)(6246003)(99286004)(229853002)(76176011)(33656002)(102836004)(26005)(5660300002)(6436002)(52536014)(186003)(53936002)(74316002)(76116006)(14454004)(72206003)(2501003)(4326008)(68736007)(14444005)(7696005); DIR:OUT; SFP:1101; SCL:1; SRVR:VE1PR08MB5072; H:VE1PR08MB5149.eurprd08.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; received-spf: None (protection.outlook.com: arm.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: WkzSuh/4riGScfTTjDexEm3tzh4NhHD1m1574ZjZRgCcBzBrAzaarC/OEixGDvRx6eaJFxidOSQv15a/bQR2j47WjLvfVbdbo2ufVjxWPm4kr8Tc8zGijwM/zAJclK6LNrmTNmuLYwoj8+jbFwZehYubKJVwQ5Enw57r+itsdqXPN6u1LhKgo/gb9UCfMlrnb31C2ywvTpBHR6dcDxFKxksCdlQJu9w2Nj2sA61YN2ed3uLKV575akcXwpDoVyJLeq7n02t9aYqtZhk7kkCp9PccYO1NtnYnL2G9r1osAgvN7Gl2K1UAyAisY2w8mpnoH/B7Rv5/6qYtr00VgRj1gUa2lIpkRTMWgtMYgodmt+Kw1u1l6VGAPw2fASCMcXuXHdr5KttLQhfPHNSs4/clXIiaL5lx8wxMlMgMwkCKKec= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-Network-Message-Id: 1765f0a5-f11e-40a9-797c-08d6eb8a6154 X-MS-Exchange-CrossTenant-originalarrivaltime: 07 Jun 2019 20:54:48.8505 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: Honnappa.Nagarahalli@arm.com X-MS-Exchange-Transport-CrossTenantHeadersStamped: VE1PR08MB5072 Subject: Re: [dpdk-dev] [PATCH 14/14] test: skip tests when missing requirements X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 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 > Let's mark as skipped the tests when they are missing some requirements l= ike a > number of used cores or specific hardware availability, like compress, cr= ypto or > eventdev devices. >=20 > Signed-off-by: David Marchand > --- > app/test/test.c | 24 ++++++++++++++++-------- > app/test/test_compressdev.c | 4 ++-- > app/test/test_cryptodev.c | 4 ++-- > app/test/test_distributor.c | 4 ++-- > app/test/test_distributor_perf.c | 4 ++-- > app/test/test_event_timer_adapter.c | 5 +++-- > app/test/test_eventdev.c | 2 ++ > app/test/test_func_reentrancy.c | 6 +++--- > app/test/test_hash_multiwriter.c | 7 +++---- > app/test/test_hash_readwrite.c | 7 +++---- > app/test/test_hash_readwrite_lf.c | 8 ++++---- > app/test/test_ipsec.c | 4 ++-- > app/test/test_mbuf.c | 13 ++++++------- > app/test/test_rcu_qsbr.c | 10 +++++----- > app/test/test_rcu_qsbr_perf.c | 9 +++++---- > app/test/test_service_cores.c | 14 ++++++++++++++ > app/test/test_stack.c | 8 +++++--- > app/test/test_timer.c | 10 +++++----- > app/test/test_timer_secondary.c | 10 ++++++---- > 19 files changed, 90 insertions(+), 63 deletions(-) >=20 >=20 > RTE_LCORE_FOREACH_SLAVE(core_id) { > diff --git a/app/test/test_hash_readwrite_lf.c > b/app/test/test_hash_readwrite_lf.c > index 5644361..2664f51 100644 > --- a/app/test/test_hash_readwrite_lf.c > +++ b/app/test/test_hash_readwrite_lf.c > @@ -1254,10 +1254,10 @@ struct { > int htm; > int use_jhash =3D 0; > int ext_bkt =3D 0; > - if (rte_lcore_count() =3D=3D 1) { > - printf("More than one lcore is required " > - "to do read write lock-free concurrency test\n"); > - return -1; > + > + if (rte_lcore_count() < 2) { > + printf("Not enough cores for hash_readwrite_lf_autotest, > expecting at least 2\n"); > + return TEST_SKIPPED; > } Looks good > diff --git a/app/test/test_rcu_qsbr.c b/app/test/test_rcu_qsbr.c index > 92ab0c2..725d27d 100644 > --- a/app/test/test_rcu_qsbr.c > +++ b/app/test/test_rcu_qsbr.c > @@ -949,14 +949,14 @@ > static int > test_rcu_qsbr_main(void) > { > + if (rte_lcore_count() < 5) { Should be '4'. 4 cores are enough for the test. > + printf("Not enough cores for rcu_qsbr_autotest, expecting at > least 5\n"); > + return TEST_SKIPPED; > + } > + > if (get_enabled_cores_mask() !=3D 0) > return -1; >=20 > - if (num_cores < 4) { > - printf("Test failed! Need 4 or more cores\n"); > - goto test_fail; > - } There is another check in 'get_enabled_cores_mask' function. We should conv= ert that as well. Suggest pulling the check in 'get_enabled_cores_mask' to = 'test_rcu_qsbr_main' > - > /* Error-checking test cases */ > if (test_rcu_qsbr_get_memsize() < 0) > goto test_fail; > diff --git a/app/test/test_rcu_qsbr_perf.c b/app/test/test_rcu_qsbr_perf.= c > index 6b1912c..dcdd9da 100644 > --- a/app/test/test_rcu_qsbr_perf.c > +++ b/app/test/test_rcu_qsbr_perf.c > @@ -623,6 +623,11 @@ > static int > test_rcu_qsbr_main(void) > { > + if (rte_lcore_count() < 3) { Should be 2. Minimum 2 cores are required. > + printf("Not enough cores for rcu_qsbr_perf_autotest, > expecting at least 3\n"); > + return TEST_SKIPPED; > + } > + > rte_atomic64_init(&updates); > rte_atomic64_init(&update_cycles); > rte_atomic64_init(&checks); > @@ -632,10 +637,6 @@ > return -1; >=20 > printf("Number of cores provided =3D %d\n", num_cores); > - if (num_cores < 2) { > - printf("Test failed! Need 2 or more cores\n"); > - goto test_fail; > - } > if (num_cores > TEST_RCU_MAX_LCORE) { Should convert this check as well to return TEST_SKIPPED. > printf("Test failed! %d cores supported\n", > TEST_RCU_MAX_LCORE); > goto test_fail;