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 CB749A054F; Tue, 2 Mar 2021 10:07:43 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 452AA4014E; Tue, 2 Mar 2021 10:07:43 +0100 (CET) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by mails.dpdk.org (Postfix) with ESMTP id 3893B40142 for ; Tue, 2 Mar 2021 10:07:41 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1614676060; 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=DIOWHqS7F/zItLUlgdQiFxPtLFAyaQi3fkOURyQS4lk=; b=H0L0RcgGYcd+adu9++pyGUT+Hgabw1xtkLP2/vJsBTCU+9rdx+Uvyi1YS6GzxPu7/NuHzE imJtZnqCYJUs3qjABY0S2poDMhZ0gGkV6Ba04O0e2/oMuUk0IB+O3k8SwKODuHNH/FeqKI JgMcbfepEkhGNFot/ioTNndbgiBX4u4= Received: from mail-ua1-f69.google.com (mail-ua1-f69.google.com [209.85.222.69]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-145-w8IFmuLVNri2YhML6u8j4g-1; Tue, 02 Mar 2021 04:07:38 -0500 X-MC-Unique: w8IFmuLVNri2YhML6u8j4g-1 Received: by mail-ua1-f69.google.com with SMTP id c27so5497187uaf.8 for ; Tue, 02 Mar 2021 01:07:38 -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=DIOWHqS7F/zItLUlgdQiFxPtLFAyaQi3fkOURyQS4lk=; b=GMt8CLlHpGVAShyHh9e1b0DjHBpq1mOu0eckr7UK0KPg9pTcag08ywQudAzPND9BZI LsfXRAtEWk05jLVXcXqh5nT3tgQq0cOKvHFlmj4zCRGMsCo5bsCq9dtrGAEn8fuljZA8 nPA4J802tvtDtLwTASquPq5jcfYPC//91gaum9+9wFDfuJujgcOMJfId202VP2JI5bUM gSGL1JZnrH9/TPksKeQWp2iJn6sHtWtSGctL3RQppD/HoxkCNVGhUP4UcjA6olTFn22w Xv4v8BI3pFoQtj5ATWYOccfedJBUUmwh74Ecuw8Py9vdNdzgs9fr1TG1dCxmZA6rqjgc SjGQ== X-Gm-Message-State: AOAM533Zv3z4vKweW3Z6OIFDc8QSVzkfeH9ctqlIzD+LULcr++zc4srp NhOs7VnwwO1IEdPUG+tDY16ydUF8CqBhqF5dcA3bXhB5vYbKVsPW6mdOhxzsEHpts9a1Gzts96x qr1X4U/mzTvIUZJIG/cU= X-Received: by 2002:a67:8ec7:: with SMTP id q190mr11641335vsd.10.1614676057694; Tue, 02 Mar 2021 01:07:37 -0800 (PST) X-Google-Smtp-Source: ABdhPJyv+8PnOgAE42nJSd58cq0ik1EHACw/tUoxeOXe+izTE63oSl4nL3HWx2BwrwGmiQu7GKI/5keBmOGkCu6Ekrg= X-Received: by 2002:a67:8ec7:: with SMTP id q190mr11641327vsd.10.1614676057472; Tue, 02 Mar 2021 01:07:37 -0800 (PST) MIME-Version: 1.0 References: <20210208165234.319578-1-aconole@redhat.com> <20210210145559.4090684-1-aconole@redhat.com> In-Reply-To: <20210210145559.4090684-1-aconole@redhat.com> From: David Marchand Date: Tue, 2 Mar 2021 10:07:26 +0100 Message-ID: To: Aaron Conole Cc: dev , Bruce Richardson , 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 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? > + > +.. _testing_guidelines: I can't find a call to the testing_guidelines reference, so this can be removed. [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?). [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. > + $ meson test -C covered --suite fast-tests > + $ ninja coverage-html -C covered > + > +The above will generate an html report in the > +`covered/meson-logs/coveragereport/` directory that can be explored > +for detailed code covered information. This can be used to assist > +in test development. > + The rest of the doc lgtm, and this is a good addition, feel free to add my review tag. Thanks Aaron. -- David Marchand