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 158F0A057B; Wed, 15 Apr 2020 15:37:05 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id C173E1D718; Wed, 15 Apr 2020 15:37:03 +0200 (CEST) Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [207.211.31.120]) by dpdk.org (Postfix) with ESMTP id 6D32D1D709 for ; Wed, 15 Apr 2020 15:37:01 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1586957820; 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=JdFs+BIfmw62qXGo4zH3h4jVFByGkfpVa4Zdv65U+yQ=; b=L8P8Oy9Cu1mzwT+cRgbCUWC4l7v6VdsDcyAQz9XYhxWv/TIs2hs5KCXcYkQTRuYlK9uxT/ UyS0OOZ3KW/JXkj0f7vT0egcnNnfjrBHis7l179g+Wpgy7W8NIox/7lK919dIweh5AVct7 jMGlL5wbxdFGbsWDkul0Fi8xfMA34uw= Received: from mail-il1-f198.google.com (mail-il1-f198.google.com [209.85.166.198]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-163-VyhdmwpgOSuqmGerBNfJwQ-1; Wed, 15 Apr 2020 09:36:56 -0400 X-MC-Unique: VyhdmwpgOSuqmGerBNfJwQ-1 Received: by mail-il1-f198.google.com with SMTP id r17so4069438ila.16 for ; Wed, 15 Apr 2020 06:36:56 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=ttnzKAMYXvOsaNV4taZKMqiIfm/rZ5OpGKcdK6pnEnM=; b=J2TgzuDHZz+Use8vECFFY6MDAKBqY9Sbgaa5eCb92LoMvKOFno+P+57ZpE3h2oZrlw 4+IbhjlA5mhthALJaGtktCauZzHXkCNK/wMzV7IVrBj2At+C/QOv8CSqCgmSLLE9S6gD WxXcbJ9t0fW0tIroIW4rRNe/M/vGgCqOeb56yXSdZqAuKhHYS85ZM91/D+IKWt5Rns3v fT0N4mHAeZMyxI9ARmIm+QPR7zup7paiYmjpk/aELZV1MM2YA/gb3F0yoJ6kKs7Yl2+o 4qHAooMg2l5m1ZvT/Hix2y2ff7uTA8yqCeCb/r89nVc4KoJLtifyJ5pDXnRS1RShg9K+ 2LiA== X-Gm-Message-State: AGi0Puby4ksSd2HJeS/bGlLurLVsVH9Bsu3u6ATz7J6fDtpIKtDBr8am 3FXX5eQhZPKH66fjunU6OY0i1eW/Q/eETkAP4+KbEKYnhJhAsJLDjuisgduIlWUhP+/0i80CA0m icUZeQ84Su27DhLSZBik= X-Received: by 2002:a92:158c:: with SMTP id 12mr5302227ilv.58.1586957815911; Wed, 15 Apr 2020 06:36:55 -0700 (PDT) X-Google-Smtp-Source: APiQypL2cLBILykHD3gHKJXz+uzXg3rj8CGqFHh0+971oOVqN/KTKFpgsQf69mDLBGwjpyiimDvJujag6FAR7es2HQY= X-Received: by 2002:a92:158c:: with SMTP id 12mr5302196ilv.58.1586957815651; Wed, 15 Apr 2020 06:36:55 -0700 (PDT) MIME-Version: 1.0 References: <20200409180332.592074-1-thomas@monjalon.net> <20200415131954.2006010-1-thomas@monjalon.net> In-Reply-To: <20200415131954.2006010-1-thomas@monjalon.net> From: David Marchand Date: Wed, 15 Apr 2020 15:36:44 +0200 Message-ID: To: Thomas Monjalon Cc: dev , Bruce Richardson , Lukasz Wojciechowski , Aaron Conole , Ruifeng Wang , Gavin Hu X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Subject: Re: [dpdk-dev] [PATCH v4] 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" On Wed, Apr 15, 2020 at 3:20 PM Thomas Monjalon wrote= : > > 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 > Reviewed-by: Lukasz Wojciechowski > Acked-by: Aaron Conole > Reviewed-by: Ruifeng Wang > --- > > v2: use variable as pointed by Lukasz > v3: avoid TOCTOU issue as suggested by David > v4: remove Linux check in meson file and skip find_program() call > > --- > MAINTAINERS | 1 + > app/test/has-hugepage.sh | 9 +++++++++ > app/test/meson.build | 10 +--------- > 3 files changed, 11 insertions(+), 9 deletions(-) > create mode 100755 app/test/has-hugepage.sh > > diff --git a/MAINTAINERS b/MAINTAINERS > index 144cf5d8ea..fe59f0224f 100644 > --- a/MAINTAINERS > +++ b/MAINTAINERS > @@ -1469,6 +1469,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..865e66cddd > --- /dev/null > +++ b/app/test/has-hugepage.sh > @@ -0,0 +1,9 @@ > +#! /bin/sh > +# SPDX-License-Identifier: BSD-3-Clause > +# Copyright 2020 Mellanox Technologies, Ltd > + > +if [ "$(uname)" =3D "Linux" ] ; then > + cat /proc/sys/vm/nr_hugepages || echo 0 > +else > + echo 0 > +fi > diff --git a/app/test/meson.build b/app/test/meson.build > index 777c536ae0..04b59cffa4 100644 > --- a/app/test/meson.build > +++ b/app/test/meson.build > @@ -396,15 +396,7 @@ dpdk_test =3D executable('dpdk-test', > install_rpath: driver_install_path, > install: true) > > -has_hugepage =3D true > -if is_linux > - check_hugepage =3D run_command('cat', > - '/proc/sys/vm/nr_hugepages') > - if (check_hugepage.returncode() !=3D 0 or > - check_hugepage.stdout().strip() =3D=3D '0') > - has_hugepage =3D false > - endif > -endif > +has_hugepage =3D run_command('has-hugepage.sh').stdout().strip() !=3D '0= ' This change will force no-huge mode on FreeBSD while before we were running with hugepages. --=20 David Marchand