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 67A87A0487 for ; Fri, 5 Jul 2019 19:54:55 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 0D1CC1BE69; Fri, 5 Jul 2019 19:54:54 +0200 (CEST) Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id B4AB31BE65 for ; Fri, 5 Jul 2019 19:54:51 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga007.jf.intel.com ([10.7.209.58]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 05 Jul 2019 10:54:42 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.63,455,1557212400"; d="scan'208";a="155319880" Received: from irsmsx152.ger.corp.intel.com ([163.33.192.66]) by orsmga007.jf.intel.com with ESMTP; 05 Jul 2019 10:54:41 -0700 Received: from irsmsx108.ger.corp.intel.com ([169.254.11.229]) by IRSMSX152.ger.corp.intel.com ([169.254.6.27]) with mapi id 14.03.0439.000; Fri, 5 Jul 2019 18:54:40 +0100 From: "Dumitrescu, Cristian" To: David Marchand , "dev@dpdk.org" Thread-Topic: [PATCH] test/table: skip when not enough memory is available Thread-Index: AQHVMxLCVYw6UW89UUa6tMCI3BnOg6a8S9QA Date: Fri, 5 Jul 2019 17:54:39 +0000 Message-ID: <3EB4FA525960D640B5BDFFD6A3D891268E8EB23B@IRSMSX108.ger.corp.intel.com> References: <1562318340-30464-1-git-send-email-david.marchand@redhat.com> In-Reply-To: <1562318340-30464-1-git-send-email-david.marchand@redhat.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiYWI2YmE1NTItYjhjZi00MDdlLWI3NWItMjczMTRhM2NjYWIwIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiVWJvWVFHdFVMdGhpQzFsVVJ4ajJ0MWZiampWMk9iQnlVSnVYRkVadk5FazR6Z1VYbU1iXC9nNG9xZ1FLS0wzb3oifQ== x-ctpclassification: CTP_NT dlp-product: dlpe-windows dlp-version: 11.2.0.6 dlp-reaction: no-action x-originating-ip: [163.33.239.181] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH] test/table: skip when not enough memory is available 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" Hi David, > -----Original Message----- > From: David Marchand [mailto:david.marchand@redhat.com] > Sent: Friday, July 5, 2019 10:19 AM > To: dev@dpdk.org > Cc: Dumitrescu, Cristian > Subject: [PATCH] test/table: skip when not enough memory is available >=20 > Following empirical tries, this test wants at least 3300M of memory to > run. >=20 > Signed-off-by: David Marchand > --- > app/test/test_table.c | 7 +++++++ > 1 file changed, 7 insertions(+) >=20 > diff --git a/app/test/test_table.c b/app/test/test_table.c > index a4b0ed6..dca1b33 100644 > --- a/app/test/test_table.c > +++ b/app/test/test_table.c > @@ -134,6 +134,13 @@ uint32_t pipeline_test_hash_cuckoo(const void > *key, > { > int status, ret; > unsigned i; > + void *p; > + > + /* empirical value, please refine when updating this test */ > + p =3D rte_malloc("enough_memory_for_test", (size_t)3300 << 20, 0); > + if (!p) > + return TEST_SKIPPED; > + rte_free(p); >=20 > ret =3D TEST_SUCCESS; >=20 > -- > 1.8.3.1 Yes, some tests need large amounts of memory. I understand your proposal, but it feels a bit like a hack for this test. C= ould we create a more generic fix? Expanding on your idea, could we wrap this code into a macro such as TEST_C= HECK_FOR_LARGE_MEMORY(memsize_in_gb) that could live in test.h and call it = for this test (and potentially others that have the same requirements)? Or maybe people have a better idea? Thanks, Cristian