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 C4394A0597; Thu, 9 Apr 2020 21:52:51 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 2E9561D146; Thu, 9 Apr 2020 21:52:51 +0200 (CEST) Received: from mailout2.w1.samsung.com (mailout2.w1.samsung.com [210.118.77.12]) by dpdk.org (Postfix) with ESMTP id 7DD041C2AB for ; Thu, 9 Apr 2020 21:52:49 +0200 (CEST) Received: from eucas1p2.samsung.com (unknown [182.198.249.207]) by mailout2.w1.samsung.com (KnoxPortal) with ESMTP id 20200409195248euoutp02e52a1fccab883d6e83df9d79d76d081a~EPsFGPzRS3073430734euoutp02p for ; Thu, 9 Apr 2020 19:52:48 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.w1.samsung.com 20200409195248euoutp02e52a1fccab883d6e83df9d79d76d081a~EPsFGPzRS3073430734euoutp02p DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1586461968; bh=14ijp45Tq8IYTInPFLybsiiG3TryfZF91SprNmktV9c=; h=Subject:To:Cc:From:Date:In-Reply-To:References:From; b=TXII5jRN3o42XCB1S80Zmru5NXqZAanhp2X7vZI8k8h+d5ctb098qXjBe1KW7SlG6 oAPlegCsCA0MnrW9E9pRznopIYXPyI/PP8PRw/9hytoCsdVVKZagHkzCd5ocUaScXe S5Koox1pdcRMTDwv02CtRv0Z48PFwXUEddZcEtSw= Received: from eusmges2new.samsung.com (unknown [203.254.199.244]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20200409195248eucas1p160bf09cb07317b3c768a46e65f101329~EPsE-saaS3062230622eucas1p1R; Thu, 9 Apr 2020 19:52:48 +0000 (GMT) Received: from eucas1p1.samsung.com ( [182.198.249.206]) by eusmges2new.samsung.com (EUCPMTA) with SMTP id 2C.04.60679.01D7F8E5; Thu, 9 Apr 2020 20:52:48 +0100 (BST) Received: from eusmtrp2.samsung.com (unknown [182.198.249.139]) by eucas1p1.samsung.com (KnoxPortal) with ESMTPA id 20200409195247eucas1p18558ef949bc776edf0fa007b03a0dd30~EPsEEoM2u2586925869eucas1p1B; Thu, 9 Apr 2020 19:52:47 +0000 (GMT) Received: from eusmgms2.samsung.com (unknown [182.198.249.180]) by eusmtrp2.samsung.com (KnoxPortal) with ESMTP id 20200409195247eusmtrp26eda988899eccd30e2fba291f97938a1~EPsEEBX0X3193631936eusmtrp2S; Thu, 9 Apr 2020 19:52:47 +0000 (GMT) X-AuditID: cbfec7f4-0cbff7000001ed07-00-5e8f7d106bee Received: from eusmtip1.samsung.com ( [203.254.199.221]) by eusmgms2.samsung.com (EUCPMTA) with SMTP id 45.EA.07950.F0D7F8E5; Thu, 9 Apr 2020 20:52:47 +0100 (BST) Received: from [106.210.88.70] (unknown [106.210.88.70]) by eusmtip1.samsung.com (KnoxPortal) with ESMTPA id 20200409195246eusmtip13c4520bce7bec64522a41a42a3314836~EPsDZ8osO2727427274eusmtip1F; Thu, 9 Apr 2020 19:52:46 +0000 (GMT) To: Thomas Monjalon , dev@dpdk.org Cc: bruce.richardson@intel.com, Aaron Conole , Ruifeng Wang , David Marchand , Gavin Hu From: Lukasz Wojciechowski Message-ID: <723d19c1-238a-e050-7ac4-79c5fbd154f5@partner.samsung.com> Date: Thu, 9 Apr 2020 21:52:45 +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: <20200409193412.667575-1-thomas@monjalon.net> Content-Transfer-Encoding: 8bit Content-Language: pl X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrLKsWRmVeSWpSXmKPExsWy7djPc7oCtf1xBs87JS1+vXnAbnFjlb3F 9hVdbBbvPm1nsjj54hWjxdW+G8wWnx6cYHFg91gzbw2jx68FS1k9F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Y smEda8FPkYo9/S9YGhjbBLsYOTkkBEwkWhaeYe5i5OIQEljKKPH7eTtrFyMHUEJG4sMlAYga YYk/17rYIGpeM0pM+djFCJIQFnCWaLj5nx3EFhEwl9j/9CM7SBGzwGagQcs2sEB07GWUOHT7 IDNIFZuArcSRmV9ZQWxeATeJSSfbwLpZBFQkVm+9zgRiiwrESvQ372aEqBGUODnzCQuIzSlg JXFj2TY2EJtZwExi3uaHzBC2vETz1tlQtojEjUctjBMYhWYhaZ+FpGUWkpZZSFoWMLKsYhRJ LS3OTc8tNtIrTswtLs1L10vOz93ECIy7bcd+btnB2PUu+BCjAAejEg+vAUN/nBBrYllxZe4h RgkOZiURXu+m3jgh3pTEyqrUovz4otKc1OJDjKZAz01klhJNzgemhLySeENTQ3MLS0NzY3Nj Mwslcd4OgYMxQgLpiSWp2ampBalFMH1MHJxSDYwamxqtn7Nw2d8u2SrM6PZNf9GcRodXq1Lf b7WU/iCf0HRBmn9degZTjfKPDxf7Jbaqvtx+7e+W3erPvr+y9Ow+36iYeP9zSrDI7rmqbzys T8YZf3WdKGDal6A1lfHmBblNM+KfbElYmtHXeX+i5lru5buPvV+8XCn2UarnuXxTI71DX5Lr fl1SYinOSDTUYi4qTgQAoBkJf9ECAAA= X-CMS-MailID: 20200409195247eucas1p18558ef949bc776edf0fa007b03a0dd30 X-Msg-Generator: CA Content-Type: text/plain; charset="utf-8" X-RootMTR: 20200409193425eucas1p174d6cef13a09d9eb2bdd5e627d316d95 X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20200409193425eucas1p174d6cef13a09d9eb2bdd5e627d316d95 References: <20200409180332.592074-1-thomas@monjalon.net> <20200409193412.667575-1-thomas@monjalon.net> Subject: Re: [dpdk-dev] [PATCH v2] 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" It's perfect now and it still works ;) Reviewed-by: Lukasz Wojciechowski W dniu 09.04.2020 o 21:34, 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 > Tested-by: Lukasz Wojciechowski > --- > > v2: use variable as pointed by Lukasz > > --- > 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..fc6cb7efaa > --- /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 $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