From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 4837BA0566; Tue, 17 Mar 2020 20:15:30 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 79BC71C0B8; Tue, 17 Mar 2020 20:15:29 +0100 (CET) Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id ED1021C07B; Tue, 17 Mar 2020 20:15:27 +0100 (CET) IronPort-SDR: qPgElu4j1djUbYaZxPAEgUYpExwAqLGQVfANHgPMQV+I8aizdUh8hBbLZ/SGOdoK3WmOSZG2dl 18FgqWuD9S2A== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Mar 2020 12:15:26 -0700 IronPort-SDR: yYlJPs5uQOp0KvwA584Ray5MlxkmGwQw5tX5X3vCKTG5jQzhGg+XWmOn5DCsJObSWJVdQ6uEz3 1VKvZxewJlGg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.70,565,1574150400"; d="scan'208";a="443867250" Received: from orsmsx110.amr.corp.intel.com ([10.22.240.8]) by fmsmga005.fm.intel.com with ESMTP; 17 Mar 2020 12:15:25 -0700 Received: from orsmsx104.amr.corp.intel.com ([169.254.4.140]) by ORSMSX110.amr.corp.intel.com ([169.254.10.144]) with mapi id 14.03.0439.000; Tue, 17 Mar 2020 12:15:25 -0700 From: "Wang, Yipeng1" To: Ruifeng Wang , "aconole@redhat.com" , "maicolgabriel@hotmail.com" , "Richardson, Bruce" , "Ananyev, Konstantin" , "Dumitrescu, Cristian" , "Gobriel, Sameh" , "Burakov, Anatoly" CC: "dev@dpdk.org" , "david.marchand@redhat.com" , "gavin.hu@arm.com" , "honnappa.nagarahalli@arm.com" , "juraj.linkes@pantheon.tech" , "nd@arm.com" , "stable@dpdk.org" Thread-Topic: [PATCH v3 1/4] test: enable tests to run in no-huge mode Thread-Index: AQHV+Q/NBP9jD9oYYkO8rTxYWpLbrKhNGQcQ Date: Tue, 17 Mar 2020 19:15:24 +0000 Message-ID: References: <20200225073236.135581-1-ruifeng.wang@arm.com> <20200313081614.195335-1-ruifeng.wang@arm.com> <20200313081614.195335-2-ruifeng.wang@arm.com> In-Reply-To: <20200313081614.195335-2-ruifeng.wang@arm.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-version: 11.2.0.6 dlp-reaction: no-action x-originating-ip: [10.22.254.140] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH v3 1/4] test: enable tests to run in no-huge mode 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" > -----Original Message----- > From: Ruifeng Wang > Sent: Friday, March 13, 2020 1:16 AM > To: aconole@redhat.com; maicolgabriel@hotmail.com; Richardson, Bruce > ; Ananyev, Konstantin > ; Dumitrescu, Cristian > ; Wang, Yipeng1 > ; Gobriel, Sameh > Cc: dev@dpdk.org; david.marchand@redhat.com; Burakov, Anatoly > ; gavin.hu@arm.com; > honnappa.nagarahalli@arm.com; juraj.linkes@pantheon.tech; nd@arm.com; > Ruifeng Wang ; stable@dpdk.org > Subject: [PATCH v3 1/4] test: enable tests to run in no-huge mode >=20 > When running with '--no-huge' flag, tests failed with messages as: > ACL context creation with invalid NUMA should have failed! > fbk hash creation should have failed > test_table_pipeline: Check pipeline invalid params failed. >=20 > These cases test against invalid socket ID as input parameter, and expect > error return. But function calls return success because invalid sock ID i= s > overwritten to SOCKET_ID_ANY when in no-huge mode. >=20 > The tests against invalid socket ID are skipped in no-huge mode. >=20 > Fixes: 5640171c528a ("malloc: fix external heap allocation in no-huge mod= e") > Cc: stable@dpdk.org >=20 > Signed-off-by: Ruifeng Wang > Reviewed-by: Gavin Hu > --- > app/test/test_acl.c | 22 ++++++++++++---------- > app/test/test_hash.c | 7 +++++-- > app/test/test_table_pipeline.c | 12 +++++++----- > 3 files changed, 24 insertions(+), 17 deletions(-) >=20 > diff --git a/app/test/test_acl.c b/app/test/test_acl.c index > 501de35da..316bf4d06 100644 > --- a/app/test/test_acl.c > +++ b/app/test/test_acl.c > @@ -1397,16 +1397,18 @@ test_invalid_parameters(void) > } else > rte_acl_free(acx); >=20 > - /* invalid NUMA node */ > - memcpy(¶m, &acl_param, sizeof(param)); > - param.socket_id =3D RTE_MAX_NUMA_NODES + 1; > - > - acx =3D rte_acl_create(¶m); > - if (acx !=3D NULL) { > - printf("Line %i: ACL context creation with invalid NUMA " > - "should have failed!\n", __LINE__); > - rte_acl_free(acx); > - return -1; > + if (rte_eal_has_hugepages()) { > + /* invalid NUMA node */ > + memcpy(¶m, &acl_param, sizeof(param)); > + param.socket_id =3D RTE_MAX_NUMA_NODES + 1; > + > + acx =3D rte_acl_create(¶m); > + if (acx !=3D NULL) { > + printf("Line %i: ACL context creation with invalid " > + "NUMA should have failed!\n", > __LINE__); > + rte_acl_free(acx); > + return -1; > + } > } >=20 > /* NULL name */ > diff --git a/app/test/test_hash.c b/app/test/test_hash.c index > fbd5725c6..ab978ea68 100644 > --- a/app/test/test_hash.c > +++ b/app/test/test_hash.c > @@ -1136,8 +1136,11 @@ fbk_hash_unit_test(void) > handle =3D rte_fbk_hash_create(&invalid_params_7); > RETURN_IF_ERROR_FBK(handle !=3D NULL, "fbk hash creation should > have failed"); >=20 > - handle =3D rte_fbk_hash_create(&invalid_params_8); > - RETURN_IF_ERROR_FBK(handle !=3D NULL, "fbk hash creation should > have failed"); > + if (rte_eal_has_hugepages()) { > + handle =3D rte_fbk_hash_create(&invalid_params_8); > + RETURN_IF_ERROR_FBK(handle !=3D NULL, > + "fbk hash creation should have > failed"); > + } >=20 > handle =3D rte_fbk_hash_create(&invalid_params_same_name_1); > RETURN_IF_ERROR_FBK(handle =3D=3D NULL, "fbk hash creation should [Wang, Yipeng]=20 For the hash table part: Acked-by: Yipeng Wang Just a side-note, not related to this patch, should we add such info in programmer's guide for rte_malloc saying that if= no-huge, then socket-id Is not taken?