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 756EAA0597; Thu, 9 Apr 2020 21:34:24 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 8197B1C2BC; Thu, 9 Apr 2020 21:34:23 +0200 (CEST) Received: from out2-smtp.messagingengine.com (out2-smtp.messagingengine.com [66.111.4.26]) by dpdk.org (Postfix) with ESMTP id 7AC781C2B6 for ; Thu, 9 Apr 2020 21:34:21 +0200 (CEST) Received: from compute7.internal (compute7.nyi.internal [10.202.2.47]) by mailout.nyi.internal (Postfix) with ESMTP id C094B5C26CB; Thu, 9 Apr 2020 15:34:20 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute7.internal (MEProxy); Thu, 09 Apr 2020 15:34:20 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; s=mesmtp; bh=75huQPF5V1 yfWksQHoUoumL1CL+o9W/RJIs1TeG3EPU=; b=juTY62ErBXhpHsx9DJa7XNyxk8 EYB6ornMJ+5kfdsTAV6fnSYVECkLH2EL9RtBQx0lxtK9zbCGK8Hdko4w9NkWSGu6 Cjehr+IZIHx4peqVYqz56qtOy+Wwaj22dshuBmRTkowGk2/WIv8KmRV4U31fW9/s dg9BZCsKwNYBh9TQI= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:date:from :in-reply-to:message-id:mime-version:references:subject:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm2; bh=75huQPF5V1yfWksQHoUoumL1CL+o9W/RJIs1TeG3EPU=; b=vmj3SZr0 IrxVA4VYq8RqqcZHqHio4g7O8qIVofHyDKNOMjMfofYCL5mxBRGt59a10FkAD3gC Lqj3iRJ93uaHpbcO3/PZr1KcOSDuX/ZmEoEAUCEThk06iht5TsZ8aVzrzXWcPizp okd0bA9WOLrPkVDaZsS/eTyz96BGk5dUQ52Wa2q/hE4hCbBz5uCukYShK4NJUuc0 n67Mnkqyalds10XlvPsjRhCPfOGnM9TtClGj7HSPK1//4kkWzmBxB1ZbeRl/t0vV R4BiXxtbUmGPEzgSjGz5u/4X2seX/eWbD9gp+ERTU5PPzfUkkx1GAbRozFzKz9Gt /S8TLZhLVsoQ6w== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduhedrudelgddufedvucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvufffkffojghfggfgsedtkeertdertddtnecuhfhrohhmpefvhhhomhgr shcuofhonhhjrghlohhnuceothhhohhmrghssehmohhnjhgrlhhonhdrnhgvtheqnecukf hppeejjedrudefgedrvddtfedrudekgeenucevlhhushhtvghrufhiiigvpedtnecurfgr rhgrmhepmhgrihhlfhhrohhmpehthhhomhgrshesmhhonhhjrghlohhnrdhnvght X-ME-Proxy: Received: from xps.monjalon.net (184.203.134.77.rev.sfr.net [77.134.203.184]) by mail.messagingengine.com (Postfix) with ESMTPA id 79AE9306005F; Thu, 9 Apr 2020 15:34:17 -0400 (EDT) From: Thomas Monjalon To: dev@dpdk.org Cc: bruce.richardson@intel.com, Lukasz Wojciechowski , Aaron Conole , Ruifeng Wang , David Marchand , Gavin Hu Date: Thu, 9 Apr 2020 21:34:12 +0200 Message-Id: <20200409193412.667575-1-thomas@monjalon.net> X-Mailer: git-send-email 2.26.0 In-Reply-To: <20200409180332.592074-1-thomas@monjalon.net> References: <20200409180332.592074-1-thomas@monjalon.net> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [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" 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)) -- 2.26.0