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 29061A0564; Thu, 11 Mar 2021 22:26:05 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 93F134014D; Thu, 11 Mar 2021 22:26:04 +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 B705E40141 for ; Thu, 11 Mar 2021 22:26:02 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1615497961; 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=hs8ouKxOJBub005pVDIWXtENyrxTnN96MZptEHfdvyo=; b=dtJPfv6vzwH5l9pSO+GauW4bDt6P7DUe3/tp7wiQ5MpYzEjt2gIgj2t58RCi5owtmPI52p w7SYzvsnVbT+5eBDPknPRj+7zOYXaMvIJ7ajUtoRgXfw5EetxHazivvhcLCQuSKjHeOl2L 5ShzRyV43gL6EwxWiVW7dg/mULoPwPA= Received: from mail-vs1-f71.google.com (mail-vs1-f71.google.com [209.85.217.71]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-142-i3bWrU9wNq2_jpd6-6lPdw-1; Thu, 11 Mar 2021 16:25:59 -0500 X-MC-Unique: i3bWrU9wNq2_jpd6-6lPdw-1 Received: by mail-vs1-f71.google.com with SMTP id w5so6169040vsf.14 for ; Thu, 11 Mar 2021 13:25:59 -0800 (PST) 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=hs8ouKxOJBub005pVDIWXtENyrxTnN96MZptEHfdvyo=; b=ZLRQu6IJ3Xl8FB7sidbJUIMT6rG4HAhEcPXuLD+1RU2C5IZGglHQlO9DoH+z4Jf+FU 6FFXdK2ZhRh0e3hQKGULgq3LBskpx/mufSbsY9/giRanvAJaOt9Jaag3D1vSiY3L/a/4 +z+8ZNC9HojZIC2KUVrm8WoklrB/EF50HWYksiGv35uZ4MZjl9TWgP3d6hFz6uhQZquV ARjBdRSEFYlmhoakP6fhrsnJgk9SldvKevEchBPsduRCwWx37FbdQ0m2qyl0pn7XZ1oS gCrUeJK0Vk7KUyfpV8wDeZwxB56z1nS+G1gKFlbhr7HGMy39GjLbnZIIHIvADzpp7doo 3RlA== X-Gm-Message-State: AOAM5307O8VxS6JcGrg/UFm8uSmSxOL5JeKsRC115Ted8DCx+CDzd77/ vyl8IV+V/9Ecr5AlQbNwJSEDS0uyIj1zefg60kO5rUcl2d08vRAIq/R73yT2jq08a+sTaHwCZ2P JT4gVzv/HAYvZy+meGLw= X-Received: by 2002:a67:d210:: with SMTP id y16mr6985868vsi.17.1615497958922; Thu, 11 Mar 2021 13:25:58 -0800 (PST) X-Google-Smtp-Source: ABdhPJwZzm3S7ot02an9lfgURGVEtb7N05TZ0sH9KW40UT/T20w7Z1yz14DL3fI4+SvVMMkWXQFDjVGGwtSfNCSFi74= X-Received: by 2002:a67:d210:: with SMTP id y16mr6985857vsi.17.1615497958625; Thu, 11 Mar 2021 13:25:58 -0800 (PST) MIME-Version: 1.0 References: <20210208165234.319578-1-aconole@redhat.com> <20210210145559.4090684-1-aconole@redhat.com> <20210302100401.GA1396@bricha3-MOBL.ger.corp.intel.com> In-Reply-To: From: David Marchand Date: Thu, 11 Mar 2021 22:25:47 +0100 Message-ID: To: Aaron Conole Cc: Bruce Richardson , dev , Ray Kinsella 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 v2] guides: add a testing guide for developing tests 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 Tue, Mar 9, 2021 at 5:14 PM Aaron Conole wrote: > >>> > +The suites can be selected by adding the ``--suite`` option to the > >>> > +``meson test`` command. Ex: ``meson test --suite fast-tests``:: > >>> > + > >>> > + $ meson test -C build --suite fast-tests > >>> > + ninja: Entering directory `/home/aconole/git/dpdk/build' > >>> > + [2543/2543] Linking target app/test/dpdk-test. > >>> > + 1/60 DPDK:fast-tests / acl_autotest OK 3.17 s > >>> > + 2/60 DPDK:fast-tests / bitops_autotest OK 0.22 s > >>> > + 3/60 DPDK:fast-tests / byteorder_autotest OK 0.22 s > >>> > + 4/60 DPDK:fast-tests / cmdline_autotest OK 0.28 s > >>> > + 5/60 DPDK:fast-tests / common_autotest OK 0.57 s > >>> > + 6/60 DPDK:fast-tests / cpuflags_autotest OK 0.27 s > >>> > + ... > >>> > >>> Trying this in my build env, I get all tests failing. > >>> This is because I run this as a normal user, but the system has > >>> hugepages configured. > >>> I figured this out quickly since I know the test framework (simply > >>> added a echo 0; exit at the top of has-hugepages.sh). > >>> But I am not sure a reader of this doc would be able to troubleshoot this. > >>> > >>> Not sure if this is worth explaining here, or if we can enhance the > >>> hugepage check (permissions maybe?). > > > > I prefer to fix the hugepage check to make the tests SKIP when we don't > > have hugepages accessible (so we need some kind of permission check in > > there). I will submit it separately. > > > > Here is my PoC for this - if you think it's good enough, I'll submit as > formal PATCH. > > --- > 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 > --- > I need to think more about the multiple mountpoints case (but I may be imagining too much twisted setups..). At least, this works in my env. We need tests in travis/GHA, and sending a non-RFC patch is the best way to know :-) So +1 for a patch. Thanks Aaron! -- David Marchand