DPDK patches and discussions
 help / color / mirror / Atom feed
From: Bruce Richardson <bruce.richardson@intel.com>
To: David Marchand <david.marchand@redhat.com>
Cc: dev <dev@dpdk.org>, Aaron Conole <aconole@redhat.com>,
	Brandon Lo <blo@iol.unh.edu>
Subject: Re: [dpdk-dev] [PATCH] test: rely on EAL detection for core list
Date: Tue, 19 Oct 2021 11:04:30 +0100	[thread overview]
Message-ID: <YW6YLp0Tc+w+YL80@bricha3-MOBL.ger.corp.intel.com> (raw)
In-Reply-To: <CAJFAV8wUXBACCnfjSFVGoepJg2_HJmgiHXdAYEHgYFk0Sx92uQ@mail.gmail.com>

On Tue, Oct 19, 2021 at 11:52:32AM +0200, David Marchand wrote:
> On Mon, Oct 18, 2021 at 7:53 PM Bruce Richardson
> <bruce.richardson@intel.com> wrote:
> >
> > On Mon, Oct 18, 2021 at 07:01:36PM +0200, David Marchand wrote:
> > > Cores count has a direct impact on the time needed to complete unit
> > > tests.
> > >
> > > Currently, the core list used for unit test is enforced to "all cores on
> > > the system" with no way for (CI) users to adapt it.
> > > On the other hand, EAL default behavior (when no -c/-l option gets passed)
> > > is to start threads on as many cores available in the process cpu
> > > affinity.
> > >
> > > Remove logic from meson: users can then select where to run the tests by
> > > either running meson with a custom cpu affinity (using taskset/cpuset
> > > depending on OS) or by passing a --test-args option to meson.
> > >
> > > Example:
> > > $ sudo meson test -C build --suite fast-tests -t 3 --test-args "-l 0-3"
> > >
> > > Signed-off-by: David Marchand <david.marchand@redhat.com>
> > > ---
> > > I wanted to post this as a RFC, but now, I wonder if all CI test RFC
> > > patches, so sending as a normal patch.
> > >
> > > ---
> > I really like this idea! Patch looks good other than it needs some doc
> > changes.
> 
> Wdyt of:
> 
> diff --git a/doc/guides/prog_guide/meson_ut.rst
> b/doc/guides/prog_guide/meson_ut.rst
> index fff88655dd..d35e0577c8 100644
> --- a/doc/guides/prog_guide/meson_ut.rst
> +++ b/doc/guides/prog_guide/meson_ut.rst
> @@ -47,9 +47,15 @@ Arguments of ``test()`` that can be provided in
> meson.build are as below:
> 
>  * ``is_parallel`` is used to run test case either in parallel or
> non-parallel mode.
>  * ``timeout`` is used to specify the timeout of test case.
> -* ``args`` is used to specify test specific parameters.
> +* ``args`` is used to specify test specific parameters (see note below).
>  * ``env`` is used to specify test specific environment parameters.
> 
> +Note: the content of meson ``--test-args`` option and the content of ``args``
> +are appended when invoking the DPDK test binary.
> +Because of this, it is recommended not to set any default coremask or memory
> +configuration in per test ``args`` and rather let users select what best fits
> +their environment. If a test can't run, then it should be skipped, as described
> +below.
> 
>  Dealing with skipped test cases
>  -------------------------------

That text is good. However, I also think we need an example above of using
test-args to limit core masks. How about also adding something like:

diff --git a/doc/guides/prog_guide/meson_ut.rst b/doc/guides/prog_guide/meson_ut.rst
index fff88655dd..4924066556 100644
--- a/doc/guides/prog_guide/meson_ut.rst
+++ b/doc/guides/prog_guide/meson_ut.rst
@@ -37,6 +37,13 @@ command::

     $ meson test --suite fast-tests

+If desired, additional arguments can be passed to the test run via the meson ``--test-args`` option.
+For example, tests will by default run on as many available cores as is needed for the test,
+starting with the lowest number core - generally core 0.
+To run the fast-tests suite using only cores 8 through 16, one can use::
+
+   $ meson test --suite fast-tests --test-args="-l 8-16"
+
 The meson command to list all available tests::

     $ meson test --list


  reply	other threads:[~2021-10-19 10:04 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-18 17:01 David Marchand
2021-10-18 17:53 ` Bruce Richardson
2021-10-19  9:52   ` David Marchand
2021-10-19 10:04     ` Bruce Richardson [this message]
2021-10-19 11:26 ` [dpdk-dev] [PATCH v2] " David Marchand
2021-10-19 12:43   ` Bruce Richardson
2021-10-19 14:46   ` Honnappa Nagarahalli
2021-10-19 15:04     ` David Marchand
2021-10-19 18:04       ` Honnappa Nagarahalli
2021-10-19 19:09   ` Aaron Conole
2021-10-19 19:28     ` David Marchand
2021-10-20 11:20       ` David Marchand
2021-10-21 14:50     ` David Marchand

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=YW6YLp0Tc+w+YL80@bricha3-MOBL.ger.corp.intel.com \
    --to=bruce.richardson@intel.com \
    --cc=aconole@redhat.com \
    --cc=blo@iol.unh.edu \
    --cc=david.marchand@redhat.com \
    --cc=dev@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).