From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 1B335A0562; Fri, 19 Mar 2021 14:41:30 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 955C540143; Fri, 19 Mar 2021 14:41:29 +0100 (CET) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mails.dpdk.org (Postfix) with ESMTP id 3B0CE4003F for ; Fri, 19 Mar 2021 14:41:27 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1616161286; 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: in-reply-to:in-reply-to:references:references; bh=lxI8kJk7kib1ovAM7g7Qxu38zTDiFD7Dg3q0oKQoUgA=; b=Lxaur+Pnc1ovILiGPiYi/sUyLGDRnIJnleDFDRAyD36zccOQPHgqX2XA4vaKYnOjIEgCuM BGo0TW4iTyasO2CQcyXclu4KTh+31MRkEYz3PjNrzFIX0X9eqhNP2qM5cwl6XNe+OLxapb jqasnLgzc9PgQRnNnAl7rkGzMt5IiAU= Received: from mail-vk1-f198.google.com (mail-vk1-f198.google.com [209.85.221.198]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-22-EwhYkWOfOdez-7-MFTZINg-1; Fri, 19 Mar 2021 09:41:25 -0400 X-MC-Unique: EwhYkWOfOdez-7-MFTZINg-1 Received: by mail-vk1-f198.google.com with SMTP id s194so12904222vkh.8 for ; Fri, 19 Mar 2021 06:41:25 -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=lxI8kJk7kib1ovAM7g7Qxu38zTDiFD7Dg3q0oKQoUgA=; b=fEhBx/YtsVaVjFECwaHWwGrLFJ7xhEF7sHLN8vXTstqMlkzz9F9d32IG8Z/HmUrKko dGf61hn47HLCyBdvSJ9gHm5rWqA9CtT9c9A9Y97C72sw74Drhe07jeRuQ39MtQqEBcLw 8SK3NDNLIq0ZCVlgFWXfI9efm9k9F6w0IK+t6ZkzTIahrC4sabwqqVHnxENcCfanmNke CUA0i4eihgbrQp8NggSAlJYCY3BtuvwNTkPGNtIdRzTpB/0jEFyt88qdXJSgAkc+wFtQ I7pA33sjYstB7iTYJM86FnwwtZ2CSDsoHm2NuPumIPsXymZn7dqWSeJQ1IdiIpAKLrqH OL/A== X-Gm-Message-State: AOAM5333LWGMrS666uDW4mUNSEcYUrvhrfCyHONGUammmrofyA9ERVZ/ 0xViWnKa0IJJhQozlFGRu6d60DyrzyUfFwyoG5tW6FbRBYPbSOYoBIJN9nMtegwJAD88PqDFumG LPE0Y/FQieUDMsFigw6Y= X-Received: by 2002:a05:6102:ed4:: with SMTP id m20mr2651394vst.27.1616161284655; Fri, 19 Mar 2021 06:41:24 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxAEPoYpjsHc/1nRSdZO/aTH9aIn+bCtUWkFjd6ZLcbGojicMwfwrEcP2mbDTaAldur2ahMtbVZn427Hdd+/tg= X-Received: by 2002:a05:6102:ed4:: with SMTP id m20mr2651378vst.27.1616161284438; Fri, 19 Mar 2021 06:41:24 -0700 (PDT) MIME-Version: 1.0 References: <20210317144409.288346-1-aconole@redhat.com> In-Reply-To: <20210317144409.288346-1-aconole@redhat.com> From: David Marchand Date: Fri, 19 Mar 2021 14:41:12 +0100 Message-ID: To: Aaron Conole Cc: dev , Thomas Monjalon , "Burakov, Anatoly" , Bruce Richardson Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=dmarchan@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" Subject: Re: [dpdk-dev] [PATCH] test: make hugepage check more robust under Linux X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 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, Mar 17, 2021 at 3:44 PM Aaron Conole wrote: > diff --git a/app/test/has-hugepage.sh b/app/test/has-hugepage.sh > index d600fad319..1c3cfb665a 100755 > --- a/app/test/has-hugepage.sh > +++ b/app/test/has-hugepage.sh > @@ -3,7 +3,17 @@ > # Copyright 2020 Mellanox Technologies, Ltd > > if [ "$(uname)" = "Linux" ] ; then > - cat /proc/sys/vm/nr_hugepages || echo 0 > + nr_hugepages=$(cat /proc/sys/vm/nr_hugepages) > + # Need to check if we have permissions to access hugepages > + perm="" > + for mount in `mount | grep hugetlbfs | awk '{ print $3; }'`; do > + test ! -w $mount/. || perm="$mount" > + done > + if [ "$perm" = "" -o "$nr_hugepages" = "0" ]; then > + echo 0 > + else > + echo $nr_hugepages > + fi > elif [ "$(uname)" = "FreeBSD" ] ; then > echo 1 # assume FreeBSD always has hugepages > else The check is evaluated first when configuring as normal user and not reevaluated when running the tests as root in Travis/GHA, so the tests are started with no hugepage. Then, in Travis and GHA, we can see (sigbus o_O) crashes in no-huge mode. I tried to reproduce but did not manage. -- David Marchand