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 A71E5A054F; Tue, 2 Mar 2021 17:00:50 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 62AAA40693; Tue, 2 Mar 2021 17:00:50 +0100 (CET) Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by mails.dpdk.org (Postfix) with ESMTP id 1553640142 for ; Tue, 2 Mar 2021 17:00:48 +0100 (CET) IronPort-SDR: BiXIaOHbxLanzw7bFt6GJ0RyEgkxeKGK0P2OFBKPHhrwFHQspKx4KBCVnCdyBXGmR3G1VDS9As 4Vpre9FlMmnA== X-IronPort-AV: E=McAfee;i="6000,8403,9911"; a="166099661" X-IronPort-AV: E=Sophos;i="5.81,216,1610438400"; d="scan'208";a="166099661" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Mar 2021 08:00:47 -0800 IronPort-SDR: GBoa+0tnd0S04+lWpoGcpFXzVcvYffEQNmUX2Xv6vcmcYBnAQyclzf8IyeOa//L/D/PRpf+vVL 2zGseZS3IFXg== X-IronPort-AV: E=Sophos;i="5.81,216,1610438400"; d="scan'208";a="399077581" Received: from bricha3-mobl.ger.corp.intel.com ([10.252.9.198]) by fmsmga008-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-SHA; 02 Mar 2021 08:00:45 -0800 Date: Tue, 2 Mar 2021 16:00:42 +0000 From: Bruce Richardson To: Aaron Conole Cc: David Marchand , dev , Ray Kinsella Message-ID: <20210302160042.GA1333@bricha3-MOBL.ger.corp.intel.com> References: <20210208165234.319578-1-aconole@redhat.com> <20210210145559.4090684-1-aconole@redhat.com> <20210302100401.GA1396@bricha3-MOBL.ger.corp.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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 02, 2021 at 10:26:59AM -0500, Aaron Conole wrote: > Bruce Richardson writes: > > > On Tue, Mar 02, 2021 at 10:07:26AM +0100, David Marchand wrote: > >> On Wed, Feb 10, 2021 at 3:56 PM Aaron Conole wrote: > >> > diff --git a/doc/guides/contributing/testing.rst b/doc/guides/contributing/testing.rst > >> > new file mode 100644 > >> > index 0000000000..86ca24ce43 > >> > --- /dev/null > >> > +++ b/doc/guides/contributing/testing.rst > >> > @@ -0,0 +1,245 @@ > >> > +.. SPDX-License-Identifier: BSD-3-Clause > >> > + Copyright 2018 The DPDK contributors > >> > >> 2021? > > Whoops, I forgot to update my time machine. > > >> > + > >> > +.. _testing_guidelines: > >> > >> I can't find a call to the testing_guidelines reference, so this can be removed. > > done. > > >> > >> [snip] > >> > >> > +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. > > >> > >> [snip] > >> > >> > +Checking code coverage > >> > +---------------------- > >> > +The meson build system supports generating a code coverage report > >> > +via the `-Db_coverage=true` option, in conjunction with a package > >> > +like **lcov**, to generate an HTML code coverage report. Example:: > >> > + > >> > + $ meson covered -Db_coverage=true > >> > >> At first, I read "covered" as a meson command :-). > >> I prefer an explicit "meson setup covered -Db_coverage=true", but well > >> this is more a matter of taste. > >> > >> > > > > I also tend to prefer the build directory name at the end of the command, > > so I'd suggest: "meson setup -Db_coverage=true covered". Furthermore, > > while I can understand the use of "covered" as a build directory name, I > > think for consistency across all docs, we should just use "build" here as > > the directory name, which again will reduce confusion. "meson setup > > -Db_coverage build" > > Okay - I will paint this bikeshed like: > > meson setup build -Db_coverage=true > > It's a little inconsistent everywhere - so I guess a good janitor > project would be to clean up all the places we have meson commands. > > Otherwise, what I've found is that the options generally come after the > build directory / command is specified (ex: see octeontx, the arm64 > cross build docs, etc.) so I'll keep that for consistency there. > Hopefully we will consistently become more consistent :) > That's some fine bikeshed painting! And I'm fine with all your suggestion. /Bruce