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 DEFEBA0564 for ; Mon, 23 Mar 2020 20:59:54 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id D69641C0BE; Mon, 23 Mar 2020 20:59:54 +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 CEDE81C0C1 for ; Mon, 23 Mar 2020 20:59:53 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1584993593; 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=KQv8HMcJhih/stNLyLPefLc5SYDoGi28ICve46B/6Qg=; b=U3HR7ANPMlEeZki5n+HPEqTwbDoixr5WK5OJLSjCIqmZZ1I9fpERKTD0UUKF2n/xew0sb1 BPZCFnMtwdLSgWf6O0HmsFpU5Rz02lFH6s8aSsRb4hCzLUIJddlKAQJKCrWlrHnetkJMqR 0R2ESxCZiN2X8gKA+tyNpwhcql9k7Nk= 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-349-njx0r9tqMSmbnUO1YFsZjw-1; Mon, 23 Mar 2020 15:59:51 -0400 X-MC-Unique: njx0r9tqMSmbnUO1YFsZjw-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 244471005513; Mon, 23 Mar 2020 19:59:49 +0000 (UTC) Received: from dmarchan.remote.csb (unknown [10.40.193.243]) by smtp.corp.redhat.com (Postfix) with ESMTP id E7EE610016EB; Mon, 23 Mar 2020 19:59:45 +0000 (UTC) From: David Marchand To: dev@dpdk.org Cc: aconole@redhat.com, ruifeng.wang@arm.com, maicolgabriel@hotmail.com, bruce.richardson@intel.com, stable@dpdk.org, Gavin Hu , Yipeng Wang , Konstantin Ananyev , Sameh Gobriel , Cristian Dumitrescu , Anatoly Burakov Date: Mon, 23 Mar 2020 20:59:23 +0100 Message-Id: <20200323195926.12182-3-david.marchand@redhat.com> In-Reply-To: <20200323195926.12182-1-david.marchand@redhat.com> References: <20200323195926.12182-1-david.marchand@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Subject: [dpdk-stable] [PATCH v4 2/5] test: skip subtests in no-huge mode X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" From: Ruifeng Wang 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 mode"= ) Cc: stable@dpdk.org Signed-off-by: Ruifeng Wang Reviewed-by: Gavin Hu Acked-by: Aaron Conole Acked-by: Yipeng Wang --- 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 501de35da1..316bf4d065 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 fbd5725c68..ab978ea689 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 fa= iled"); =20 -=09handle =3D rte_fbk_hash_create(&invalid_params_8); -=09RETURN_IF_ERROR_FBK(handle !=3D NULL, "fbk hash creation should have fa= iled"); +=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 have = succeeded"); diff --git a/app/test/test_table_pipeline.c b/app/test/test_table_pipeline.= c index 441338ac01..bc412c3081 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 */ --=20 2.23.0