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 A01E1A0563; Tue, 17 Mar 2020 13:49:33 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 77C391BF98; Tue, 17 Mar 2020 13:49:33 +0100 (CET) Received: from us-smtp-delivery-74.mimecast.com (us-smtp-delivery-74.mimecast.com [216.205.24.74]) by dpdk.org (Postfix) with ESMTP id 326AF2BF9 for ; Tue, 17 Mar 2020 13:49:32 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1584449371; 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: in-reply-to:in-reply-to:references:references; bh=WNNilpywWcRb9Wlol+44E0cm8b3QlN6ep7uD5NHDMNg=; b=AWlp2Usi/CGpLpxs/FcMFRKG5am6hD5ke06geHaEdpmxZnXzeu5dIYg+p0F2aRZleEOmmM 8XN7O4kq8VwREaujlKRR23wz0XMCpHIoWwqWEPASkMwV/fu43PmUKqqzA3dHMpXPNDBjrw wzAdEvW5lpgEWCuMItUG0ZWrRor6MIc= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-193-RsfK3kNGMH6we5yvpt39qQ-1; Tue, 17 Mar 2020 08:49:28 -0400 X-MC-Unique: RsfK3kNGMH6we5yvpt39qQ-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 3886A8017DF; Tue, 17 Mar 2020 12:49:26 +0000 (UTC) Received: from dhcp-25.97.bos.redhat.com (ovpn-116-107.rdu2.redhat.com [10.10.116.107]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 23DA46E3EE; Tue, 17 Mar 2020 12:49:21 +0000 (UTC) From: Aaron Conole To: Ruifeng Wang Cc: maicolgabriel@hotmail.com, bruce.richardson@intel.com, konstantin.ananyev@intel.com, cristian.dumitrescu@intel.com, yipeng1.wang@intel.com, sameh.gobriel@intel.com, dev@dpdk.org, david.marchand@redhat.com, anatoly.burakov@intel.com, gavin.hu@arm.com, honnappa.nagarahalli@arm.com, juraj.linkes@pantheon.tech, nd@arm.com, stable@dpdk.org References: <20200225073236.135581-1-ruifeng.wang@arm.com> <20200313081614.195335-1-ruifeng.wang@arm.com> <20200313081614.195335-2-ruifeng.wang@arm.com> Date: Tue, 17 Mar 2020 08:49:20 -0400 In-Reply-To: <20200313081614.195335-2-ruifeng.wang@arm.com> (Ruifeng Wang's message of "Fri, 13 Mar 2020 16:16:11 +0800") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain Content-Transfer-Encoding: quoted-printable 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" Ruifeng Wang writes: > 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. > > These cases test against invalid socket ID as input parameter, and > expect error return. But function calls return success because > invalid sock ID is overwritten to SOCKET_ID_ANY when in no-huge mode. > > The tests against invalid socket ID are skipped in no-huge mode. > > Fixes: 5640171c528a ("malloc: fix external heap allocation in no-huge mod= e") > Cc: stable@dpdk.org > > Signed-off-by: Ruifeng Wang > Reviewed-by: Gavin Hu > --- Acked-by: Aaron Conole > 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(-) > > 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) > =09} else > =09=09rte_acl_free(acx); > =20 > -=09/* invalid NUMA node */ > -=09memcpy(¶m, &acl_param, sizeof(param)); > -=09param.socket_id =3D RTE_MAX_NUMA_NODES + 1; > - > -=09acx =3D rte_acl_create(¶m); > -=09if (acx !=3D NULL) { > -=09=09printf("Line %i: ACL context creation with invalid NUMA " > -=09=09=09=09"should have failed!\n", __LINE__); > -=09=09rte_acl_free(acx); > -=09=09return -1; > +=09if (rte_eal_has_hugepages()) { > +=09=09/* invalid NUMA node */ > +=09=09memcpy(¶m, &acl_param, sizeof(param)); > +=09=09param.socket_id =3D RTE_MAX_NUMA_NODES + 1; > + > +=09=09acx =3D rte_acl_create(¶m); > +=09=09if (acx !=3D NULL) { > +=09=09=09printf("Line %i: ACL context creation with invalid " > +=09=09=09=09=09"NUMA should have failed!\n", __LINE__); > +=09=09=09rte_acl_free(acx); > +=09=09=09return -1; > +=09=09} > =09} > =20 > =09/* 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) > =09handle =3D rte_fbk_hash_create(&invalid_params_7); > =09RETURN_IF_ERROR_FBK(handle !=3D NULL, "fbk hash creation should have = failed"); > =20 > -=09handle =3D rte_fbk_hash_create(&invalid_params_8); > -=09RETURN_IF_ERROR_FBK(handle !=3D NULL, "fbk hash creation should have = failed"); > +=09if (rte_eal_has_hugepages()) { > +=09=09handle =3D rte_fbk_hash_create(&invalid_params_8); > +=09=09RETURN_IF_ERROR_FBK(handle !=3D NULL, > +=09=09=09=09=09"fbk hash creation should have failed"); > +=09} > =20 > =09handle =3D rte_fbk_hash_create(&invalid_params_same_name_1); > =09RETURN_IF_ERROR_FBK(handle =3D=3D NULL, "fbk hash creation should hav= e succeeded"); > diff --git a/app/test/test_table_pipeline.c b/app/test/test_table_pipelin= e.c > index 441338ac0..bc412c308 100644 > --- a/app/test/test_table_pipeline.c > +++ b/app/test/test_table_pipeline.c > @@ -190,11 +190,13 @@ check_pipeline_invalid_params(void) > =09=09goto fail; > =09} > =20 > -=09p =3D rte_pipeline_create(&pipeline_params_3); > -=09if (p !=3D NULL) { > -=09=09RTE_LOG(INFO, PIPELINE, "%s: Configure pipeline with invalid " > -=09=09=09"socket\n", __func__); > -=09=09goto fail; > +=09if (rte_eal_has_hugepages()) { > +=09=09p =3D rte_pipeline_create(&pipeline_params_3); > +=09=09if (p !=3D NULL) { > +=09=09=09RTE_LOG(INFO, PIPELINE, "%s: Configure pipeline with " > +=09=09=09=09"invalid socket\n", __func__); > +=09=09=09goto fail; > +=09=09} > =09} > =20 > =09/* Check pipeline consistency */