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 D9BBFA0597; Thu, 9 Apr 2020 21:58:08 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id DDBF81D152; Thu, 9 Apr 2020 21:58:07 +0200 (CEST) Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [205.139.110.120]) by dpdk.org (Postfix) with ESMTP id 9A9211D14E for ; Thu, 9 Apr 2020 21:58:06 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1586462285; 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=zk34XwoQL2XacbTuFg/WZUQe+frlJ8l3nNC7IuXBcaI=; b=ihvcU1cGkLtsIz3T9Cqhn0+CDBs5aLqiPD6zEVHSyzrxxfZVG8hfCaGDxo6BGL8BZsMVr3 ZRI3i2QK8D//Co7tx3iPp+H/7o3ng0/InLmr49XzUi2yV934LMbeqs5vBxBgK+CLaFZJZt i97zcQtc/iULz0bYOUUG5n9TwAGS4dc= 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-270-tCg8ospgMrOWbCZteRBr3A-1; Thu, 09 Apr 2020 15:58:02 -0400 X-MC-Unique: tCg8ospgMrOWbCZteRBr3A-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 33AFD1005509; Thu, 9 Apr 2020 19:58:01 +0000 (UTC) Received: from dhcp-25.97.bos.redhat.com (ovpn-116-136.phx2.redhat.com [10.3.116.136]) by smtp.corp.redhat.com (Postfix) with ESMTPS id E22B11001DC0; Thu, 9 Apr 2020 19:57:56 +0000 (UTC) From: Aaron Conole To: Thomas Monjalon Cc: dev@dpdk.org, bruce.richardson@intel.com, Lukasz Wojciechowski , Ruifeng Wang , David Marchand , Gavin Hu References: <20200409180332.592074-1-thomas@monjalon.net> <20200409193412.667575-1-thomas@monjalon.net> Date: Thu, 09 Apr 2020 15:57:55 -0400 In-Reply-To: <20200409193412.667575-1-thomas@monjalon.net> (Thomas Monjalon's message of "Thu, 9 Apr 2020 21:34:12 +0200") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) 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 Content-Transfer-Encoding: quoted-printable 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" Thomas Monjalon writes: > 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 > --- Acked-by: Aaron Conole > 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=3D/proc/sys/vm/nr_hugepages > + > +if [ -r "$linux_hugepages_number" ] ; then > +=09cat $linux_hugepages_number > +else > +=09echo 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 =3D executable('dpdk-test', > =20 > has_hugepage =3D true > if is_linux > -=09check_hugepage =3D run_command('cat', > -=09=09=09=09 '/proc/sys/vm/nr_hugepages') > -=09if (check_hugepage.returncode() !=3D 0 or > -=09 check_hugepage.stdout().strip() =3D=3D '0') > -=09=09has_hugepage =3D false > -=09endif > +=09check_hugepage =3D find_program('has-hugepage.sh') > +=09has_hugepage =3D run_command(check_hugepage).stdout().strip() !=3D '0= ' > endif > message('hugepage availability: @0@'.format(has_hugepage))