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 EDBB1A0562; Fri, 19 Mar 2021 15:34:15 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id B18D740143; Fri, 19 Mar 2021 15:34:15 +0100 (CET) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [63.128.21.124]) by mails.dpdk.org (Postfix) with ESMTP id A0B904003F for ; Fri, 19 Mar 2021 15:34:13 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1616164453; 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=l2DMtuQt+eAni3AZ6yQ79YRJYtbNcKBxAmxjHTVDAtw=; b=EL1BMO6AvnO8xoC7BW4SM9yKrB1mcpoF48VbS9HROTFNU71Yxc8OuC2fpu1rsmVEm4rHjp i68jnAhkCXyQnkGGn5KQShIqHPgS5d38LeGXtcMbqsQAXjuCKXfDnyoy4395C79scsLJg0 0cR7AvoIFIvcUIO24B2hNp3J++fd7mk= 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-418-r7KFRl13N2uJga9gSip7Wg-1; Fri, 19 Mar 2021 10:34:09 -0400 X-MC-Unique: r7KFRl13N2uJga9gSip7Wg-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 0CAEB83DD23; Fri, 19 Mar 2021 14:34:08 +0000 (UTC) Received: from dhcp-25.97.bos.redhat.com (ovpn-117-172.rdu2.redhat.com [10.10.117.172]) by smtp.corp.redhat.com (Postfix) with ESMTPS id A489AE142; Fri, 19 Mar 2021 14:34:03 +0000 (UTC) From: Aaron Conole To: David Marchand Cc: dev , Thomas Monjalon , "Burakov\, Anatoly" , Bruce Richardson References: <20210317144409.288346-1-aconole@redhat.com> Date: Fri, 19 Mar 2021 10:34:02 -0400 In-Reply-To: (David Marchand's message of "Fri, 19 Mar 2021 14:41:12 +0100") 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.23 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=aconole@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain 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" David Marchand writes: > 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. I noticed that as well. I am equally as confused, but I'm working on it (along with folding in Thomas' suggestions).