On Fri, 3 Jul 2026 15:42:16 +0100
Marat Khalili <[email protected]> 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 <[email protected]>
> ---

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 via email to