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 AB087A0597; Thu, 9 Apr 2020 20:11:03 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id A921A1C25A; Thu, 9 Apr 2020 20:11:02 +0200 (CEST) Received: from mailout1.w1.samsung.com (mailout1.w1.samsung.com [210.118.77.11]) by dpdk.org (Postfix) with ESMTP id EFB491C23E for ; Thu, 9 Apr 2020 20:11:00 +0200 (CEST) Received: from eucas1p1.samsung.com (unknown [182.198.249.206]) by mailout1.w1.samsung.com (KnoxPortal) with ESMTP id 20200409181100euoutp01d266d41a43659bfed39bd49a9997807b~EOTMaN6eE2945229452euoutp01f for ; Thu, 9 Apr 2020 18:11:00 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.w1.samsung.com 20200409181100euoutp01d266d41a43659bfed39bd49a9997807b~EOTMaN6eE2945229452euoutp01f DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1586455860; bh=rRhyPL23IVRA5XC3BHsurXFJ4BrvVqhgT0Pejr3px+Y=; h=Subject:To:Cc:From:Date:In-Reply-To:References:From; b=gntP6CiVkRyyFZ/uUQ0Y1YRQQaVk/JTbN33Qpz2T0e+L93U26HoTcA1/15OgT/uxV REzCQ5xbT+RWgVL/1+CcjwGm0Ti5iTXCaluIz1lDY4KBEurPhvqbL4bx/8TnUl6LP7 4/QuogFV6WFRUFD0Ui2tJqjklEMTj4QI0x5q+mqw= Received: from eusmges2new.samsung.com (unknown [203.254.199.244]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20200409181059eucas1p139833ae1e91aaee26a570d5032692358~EOTLbBgdg0243502435eucas1p1m; Thu, 9 Apr 2020 18:10:59 +0000 (GMT) Received: from eucas1p2.samsung.com ( [182.198.249.207]) by eusmges2new.samsung.com (EUCPMTA) with SMTP id 81.E1.60679.3356F8E5; Thu, 9 Apr 2020 19:10:59 +0100 (BST) Received: from eusmtrp1.samsung.com (unknown [182.198.249.138]) by eucas1p1.samsung.com (KnoxPortal) with ESMTPA id 20200409181059eucas1p1b1f3241f2b0bbe23ae861c078a78a9dc~EOTLLJSgy1719117191eucas1p1I; Thu, 9 Apr 2020 18:10:59 +0000 (GMT) Received: from eusmgms2.samsung.com (unknown [182.198.249.180]) by eusmtrp1.samsung.com (KnoxPortal) with ESMTP id 20200409181059eusmtrp1fd0d7b852723eb4dad189719808dc45d~EOTLKi8BD1996319963eusmtrp1e; Thu, 9 Apr 2020 18:10:59 +0000 (GMT) X-AuditID: cbfec7f4-0cbff7000001ed07-86-5e8f65331e1b Received: from eusmtip2.samsung.com ( [203.254.199.222]) by eusmgms2.samsung.com (EUCPMTA) with SMTP id 1C.79.07950.2356F8E5; Thu, 9 Apr 2020 19:10:59 +0100 (BST) Received: from [106.210.88.70] (unknown [106.210.88.70]) by eusmtip2.samsung.com (KnoxPortal) with ESMTPA id 20200409181058eusmtip21b0aeb809f2488418d2464ace4a9692b~EOTKlIWzD3267632676eusmtip2S; Thu, 9 Apr 2020 18:10:58 +0000 (GMT) To: Thomas Monjalon , dev@dpdk.org Cc: bruce.richardson@intel.com, Ruifeng Wang , Gavin Hu , Aaron Conole , David Marchand From: Lukasz Wojciechowski Message-ID: <8ef66748-745c-1f22-9985-536ab9a62272@partner.samsung.com> Date: Thu, 9 Apr 2020 20:10:57 +0200 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.6.0 MIME-Version: 1.0 In-Reply-To: <20200409180332.592074-1-thomas@monjalon.net> Content-Transfer-Encoding: 8bit Content-Language: pl X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrNKsWRmVeSWpSXmKPExsWy7djP87rGqf1xBg93CVn8evOA3eLGKnuL 7Su62CzefdrOZHHyxStGi6t9N5gtPj04weLA7rFm3hpG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sl6GVc ej2PtWCFcMWD63eZGxjv8HcxcnBICJhIvFvv0MXIxSEksJRRouvuXmaIuIzEh0sCXYycQKaw xJ9rXWwQNa8ZJeauPsgKUiMs4C1x6hs/SI2IgLnE/qcf2UFqmAU2M0q8vXuVEaKhl1Fi1fpO VpAqNgFbiSMzv4LZvAJuErvez2QCsVkEVCSWTD/KCGKLCsRK9DfvZoSoEZQ4OfMJC4jNKWAl 0dl3BizOLGAmMW/zQ2YIW16ieetsKFtE4sajFsYJjEKzkLTPQtIyC0nLLCQtCxhZVjGKpJYW 56bnFhvpFSfmFpfmpesl5+duYgTG3LZjP7fsYOx6F3yIUYCDUYmH14ChP06INbGsuDL3EKME B7OSCK93U2+cEG9KYmVValF+fFFpTmrxIUZToOcmMkuJJucD00FeSbyhqaG5haWhubG5sZmF kjhvh8DBGCGB9MSS1OzU1ILUIpg+Jg5OqQZGDZEao0qL2Y/0JyyRZK8yYTqj/H9D4SeenqNm i32sKiKPFBgES2yZ9OPc8mmnXlvekr12QirwaetSUetVhgG1XLdjvhS6qKY/4tw3wT7Ns0iV e/vZxtmuNTfXTblcx7Gw7Knhly8cK5tyl27TlTgx4fyX3WvWzHmwuKZixtxPC9JZlna9+b14 ghJLcUaioRZzUXEiAOsSIVLPAgAA X-CMS-MailID: 20200409181059eucas1p1b1f3241f2b0bbe23ae861c078a78a9dc X-Msg-Generator: CA Content-Type: text/plain; charset="utf-8" X-RootMTR: 20200409180425eucas1p207746156e52ec225d173466de7bee9f4 X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20200409180425eucas1p207746156e52ec225d173466de7bee9f4 References: <20200409180332.592074-1-thomas@monjalon.net> Subject: Re: [dpdk-dev] [PATCH] test: remove meson dependency on /proc file 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" W dniu 09.04.2020 o 20:03, Thomas Monjalon pisze: > Meson is detecting the path /proc/sys/vm/nr_hugepages in the call to cat > in app/test/meson.build and then adding it as a build dependency. > This causes build loop if the timestamp of this file keeps changing. > > It is fixed by hiding hugepage check in a shell script. > > Fixes: 77784ef0fba8 ("test: allow no-huge mode for fast-tests") > > Signed-off-by: Thomas Monjalon > --- > MAINTAINERS | 1 + > app/test/has-hugepage.sh | 11 +++++++++++ > app/test/meson.build | 8 ++------ > 3 files changed, 14 insertions(+), 6 deletions(-) > create mode 100755 app/test/has-hugepage.sh > > diff --git a/MAINTAINERS b/MAINTAINERS > index 4800f6884a..aa619b6762 100644 > --- a/MAINTAINERS > +++ b/MAINTAINERS > @@ -1471,6 +1471,7 @@ F: app/test/Makefile > F: app/test/autotest* > F: app/test/commands.c > F: app/test/get-coremask.sh > +F: app/test/has-hugepage.sh > F: app/test/packet_burst_generator.c > F: app/test/packet_burst_generator.h > F: app/test/process.h > diff --git a/app/test/has-hugepage.sh b/app/test/has-hugepage.sh > new file mode 100755 > index 0000000000..484fc5541f > --- /dev/null > +++ b/app/test/has-hugepage.sh > @@ -0,0 +1,11 @@ > +#! /bin/sh -e > +# SPDX-License-Identifier: BSD-3-Clause > +# Copyright 2020 Mellanox Technologies, Ltd > + > +linux_hugepages_number=/proc/sys/vm/nr_hugepages > + > +if [ -r "$linux_hugepages_number" ] ; then > + cat /proc/sys/vm/nr_hugepages cat $linux_hugepages_number > +else > + echo 0 > +fi > diff --git a/app/test/meson.build b/app/test/meson.build > index 351d29cb65..542408d614 100644 > --- a/app/test/meson.build > +++ b/app/test/meson.build > @@ -399,12 +399,8 @@ dpdk_test = executable('dpdk-test', > > has_hugepage = true > if is_linux > - check_hugepage = run_command('cat', > - '/proc/sys/vm/nr_hugepages') > - if (check_hugepage.returncode() != 0 or > - check_hugepage.stdout().strip() == '0') > - has_hugepage = false > - endif > + check_hugepage = find_program('has-hugepage.sh') > + has_hugepage = run_command(check_hugepage).stdout().strip() != '0' > endif > message('hugepage availability: @0@'.format(has_hugepage)) > -- Lukasz Wojciechowski Principal Software Engineer Samsung R&D Institute Poland Samsung Electronics Office +48 22 377 88 25 l.wojciechow@partner.samsung.com