On Mon, Oct 18, 2021 at 7:53 PM Bruce Richardson
<bruce.richard...@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.march...@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
 -------------------------------


-- 
David Marchand

Reply via email to