public inbox for dev@dpdk.org
 help / color / mirror / Atom feed
From: Stephen Hemminger <stephen@networkplumber.org>
To: dev@dpdk.org
Cc: Stephen Hemminger <stephen@networkplumber.org>,
	stable@dpdk.org, Marat Khalili <marat.khalili@huawei.com>
Subject: [PATCH v2 5/6] test: add file-prefix for all fast-tests on Linux
Date: Mon, 19 Jan 2026 17:55:08 -0800	[thread overview]
Message-ID: <20260120015759.301155-6-stephen@networkplumber.org> (raw)
In-Reply-To: <20260120015759.301155-1-stephen@networkplumber.org>

When running tests in parallel on systems with many cores, multiple test
processes collide on the default "rte" file-prefix, causing EAL
initialization failures:

  EAL: Cannot allocate memzone list: Device or resource busy
  EAL: Cannot init memzone

This occurs because all DPDK tests (including --no-huge tests) use
file-backed arrays for memzone tracking. These files are created at
/var/run/dpdk/<prefix>/fbarray_memzone and require exclusive locking
during initialization. When multiple tests run in parallel with the
same file-prefix, they compete for this lock.

The original implementation included --file-prefix for Linux to
prevent this collision. This was later removed during test
infrastructure refactoring.

Restore the --file-prefix argument for all fast-tests on Linux,
regardless of whether they use hugepages. Tests that exercise
file-prefix functionality (like eal_flags_file_prefix_autotest)
spawn child processes with their own hardcoded prefixes and use
get_current_prefix() to verify the parent's resources, so they work
correctly regardless of what prefix the parent process uses.

Fixes: 50823f30f0c8 ("test: build using per-file dependencies")
Cc: stable@dpdk.org

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Marat Khalili <marat.khalili@huawei.com>
---
 app/test/suites/meson.build | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/app/test/suites/meson.build b/app/test/suites/meson.build
index 1010150eee..4c815ea097 100644
--- a/app/test/suites/meson.build
+++ b/app/test/suites/meson.build
@@ -85,11 +85,15 @@ foreach suite:test_suites
             if nohuge
                 test_args += test_no_huge_args
             elif not has_hugepage
-                continue  #skip this tests
+                continue  # skip this test
             endif
             if not asan and get_option('b_sanitize').contains('address')
                 continue  # skip this test
             endif
+            if is_linux
+                # use unique file-prefix to allow parallel runs
+                test_args += ['--file-prefix=' + test_name.underscorify()]
+            endif
 
             if get_option('default_library') == 'shared'
                 test_args += ['-d', dpdk_drivers_build_dir]
-- 
2.51.0


  parent reply	other threads:[~2026-01-20  1:58 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <0260118201223.323024-1-stephen@networkplumber.org>
2026-01-20  1:55 ` [PATCH v2 0/6] fix test failures on larger core systems Stephen Hemminger
2026-01-20  1:55   ` [PATCH v2 1/6] test: add pause to synchronization spinloops Stephen Hemminger
2026-01-21 16:10     ` Bruce Richardson
2026-01-20  1:55   ` [PATCH v2 2/6] test: fix timeout for atomic test on high core count systems Stephen Hemminger
2026-01-21 16:11     ` Bruce Richardson
2026-01-20  1:55   ` [PATCH v2 3/6] test: fix error handling in ELF load tests Stephen Hemminger
2026-01-20 12:08     ` Marat Khalili
2026-01-20  1:55   ` [PATCH v2 4/6] test: fix unsupported BPF instructions in elf load test Stephen Hemminger
2026-01-21 16:20     ` Bruce Richardson
2026-01-20  1:55   ` Stephen Hemminger [this message]
2026-01-21 16:22     ` [PATCH v2 5/6] test: add file-prefix for all fast-tests on Linux Bruce Richardson
2026-01-20  1:55   ` [PATCH v2 6/6] test: fix trace_autotest_with_traces parallel execution Stephen Hemminger
2026-01-21 16:29     ` Bruce Richardson
2026-01-21 16:31   ` [PATCH v2 0/6] fix test failures on larger core systems Bruce Richardson

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=20260120015759.301155-6-stephen@networkplumber.org \
    --to=stephen@networkplumber.org \
    --cc=dev@dpdk.org \
    --cc=marat.khalili@huawei.com \
    --cc=stable@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