DPDK-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Stephen Hemminger <stephen@networkplumber.org>
To: Marat Khalili <marat.khalili@huawei.com>
Cc: <dev@dpdk.org>, <thomas@monjalon.net>
Subject: Re: [PATCH] test/suites: clean up per-test directories
Date: Fri, 3 Jul 2026 08:49:39 -0700	[thread overview]
Message-ID: <20260703084939.0a1d0591@phoenix.local> (raw)
In-Reply-To: <20260703144216.43804-1-marat.khalili@huawei.com>

On Fri, 3 Jul 2026 15:42:16 +0100
Marat Khalili <marat.khalili@huawei.com> wrote:

> After commit 5ef166838394 ("test: add file-prefix for all fast-tests on
> Linux") each test within a suite has its own --file-prefix filled with
> the test name to enable parallel execution. It brought a couple of
> drawbacks though:
> * Solution only applied to one test suite.
> * Each working directory occupied ~25MB, with hundreds of tests this
>   easily overfilled /run filesystems of small VMs. Currently executing
>   fast-tests suite consumes 2.8GB of RAM, and adding more tests created
>   problems for github CI.
> * While it enabled parallel execution of tests within a single build
>   directory, --file-prefix argument could no longer be specified
>   externally (caused duplicate argument error). Specifying custom
>   --file-prefix was necessary when multiple builds ran in the same
>   environment, so the corresponding workflow became broken.
> 
> Move --file-prefix logic into a separate shell script, preserving
> existing argument and cleaning the work directory after the test.
> Apply it uniformly to all tests.
> 
> Signed-off-by: Marat Khalili <marat.khalili@huawei.com>
> ---

AI review run manually shows:



Error — app/test/suites/meson.build, dump/debug-tests loop

The loop was changed to pass args : test_args, but test_args at that point is leftover state from the telemetry block above ([dpdk_test_as_arg] + test_no_huge_args + --vdev=... + '-a 0000:00:00.0') — or, if RTE_LIB_TELEMETRY is disabled, whatever the last fast-test iteration happened to leave in it. The debug tests previously ran with no extra args. Every other simple loop correctly uses test_args_prefix; this one should as well.

On Linux the effect is worse than just wrong EAL args: test_args begins with dpdk_test_as_arg (the wrapper's own path), so meson invokes the wrapper with the wrapper path as its first argument. The wrapper then re-execs itself before finally running the real binary — with --no-huge, the skeleton --vdev set, and -a 0000:00:00.0 that were only meant for telemetry_all.

Fix:

foreach arg : dump_test_names
    test(arg, dpdk_test,
                args : test_args_prefix,
                env : ['DPDK_TEST=' + arg],
                ...

On Windows test_args_prefix is [], which also restores the original no-args behavior there.

Info — uid check diverges from the algorithm it cites. eal_filesystem.c keys the /var/run vs XDG_RUNTIME_DIR choice on getuid() (real uid); the script tests $EUID (effective). These only differ under setuid / sudo-with-preserved-ruid, which won't happen in normal CI, but if the goal is to match EAL exactly, use $UID (or id -ru).

Info — mixed indentation in the wrapper: the two runtime_directory=... assignments inside the root check use tab-plus-spaces, while the rest of the script uses hard tabs.

  reply	other threads:[~2026-07-03 15:49 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-03 14:42 [PATCH] test/suites: clean up per-test directories Marat Khalili
2026-07-03 15:49 ` Stephen Hemminger [this message]
2026-07-03 17:17 ` [PATCH v2] " Marat Khalili

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=20260703084939.0a1d0591@phoenix.local \
    --to=stephen@networkplumber.org \
    --cc=dev@dpdk.org \
    --cc=marat.khalili@huawei.com \
    --cc=thomas@monjalon.net \
    /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