All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bruce Richardson <bruce.richardson@intel.com>
To: dev@dpdk.org
Cc: david.marchand@redhat.com, Bruce Richardson <bruce.richardson@intel.com>
Subject: [PATCH v2 3/3] test/eal_flags: remove PCI probing for recursive calls
Date: Fri, 13 Feb 2026 15:22:26 +0000	[thread overview]
Message-ID: <20260213152227.879170-4-bruce.richardson@intel.com> (raw)
In-Reply-To: <20260213152227.879170-1-bruce.richardson@intel.com>

When creating another primary process as part of EAL flag testing, avoid
unexpected side-effects due to the HW being used by disabling PCI
probing at process startup.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---
 app/test/test_eal_flags.c | 67 ++++++++++++++++++++-------------------
 1 file changed, 34 insertions(+), 33 deletions(-)

diff --git a/app/test/test_eal_flags.c b/app/test/test_eal_flags.c
index 83e906a069..bebddf1c98 100644
--- a/app/test/test_eal_flags.c
+++ b/app/test/test_eal_flags.c
@@ -121,6 +121,7 @@ test_misc_flags(void)
 #define no_shconf "--no-shconf"
 #define allow "--allow"
 #define vdev "--vdev"
+#define no_pci "--no-pci"
 #define eal_debug_logs "--log-level=lib.eal:debug"
 #define bus_debug_logs "--log-level=bus.*:debug"
 
@@ -930,28 +931,28 @@ test_misc_flags(void)
 	const char *argv5[] = {prgname, prefix, mp_flag, eal_debug_logs, "--syslog=invalid"};
 
 	/* With no-sh-conf, also use no-huge to ensure this test runs on BSD */
-	const char *argv6[] = {prgname, eal_debug_logs, "-m", DEFAULT_MEM_SIZE,
+	const char *argv6[] = {prgname, eal_debug_logs, no_pci, "-m", DEFAULT_MEM_SIZE,
 			no_shconf, nosh_prefix, no_huge};
 
 	/* With --huge-dir */
 	const char *argv7[] = {prgname, "-m", DEFAULT_MEM_SIZE,
-			eal_debug_logs,
+			eal_debug_logs, no_pci,
 			"--file-prefix=hugedir", "--huge-dir", hugepath};
 	/* With empty --huge-dir (should fail) */
 	const char *argv8[] = {prgname, "-m", DEFAULT_MEM_SIZE,
-			eal_debug_logs,
+			eal_debug_logs, no_pci,
 			"--file-prefix=hugedir", "--huge-dir"};
 	/* With invalid --huge-dir */
 	const char *argv9[] = {prgname, "-m", DEFAULT_MEM_SIZE,
-			eal_debug_logs,
+			eal_debug_logs, no_pci,
 			"--file-prefix=hugedir", "--huge-dir", "invalid"};
 	/* With invalid --huge-dir sub-directory */
 	const char *argv10[] = {prgname, "-m", DEFAULT_MEM_SIZE,
-			eal_debug_logs,
+			eal_debug_logs, no_pci,
 			"--file-prefix=hugedir", "--huge-dir", hugepath_dir};
 	/* With valid --huge-dir sub-directory */
 	const char *argv11[] = {prgname, "-m", DEFAULT_MEM_SIZE,
-			eal_debug_logs,
+			eal_debug_logs, no_pci,
 			"--file-prefix=hugedir", "--huge-dir", hugepath_dir2};
 	/* Secondary process with invalid --huge-dir (should run as flag has no
 	 * effect on secondary processes) */
@@ -960,41 +961,41 @@ test_misc_flags(void)
 
 	/* try running with base-virtaddr param */
 	const char *argv13[] = {prgname, "--file-prefix=virtaddr",
-			eal_debug_logs,
+			eal_debug_logs, no_pci,
 			"--base-virtaddr=0x23456789"};
 
 	/* try running with --vfio-intr INTx flag */
 	const char *argv14[] = {prgname, "--file-prefix=intr",
-			eal_debug_logs,
+			eal_debug_logs, no_pci,
 			"--vfio-intr=legacy"};
 
 	/* try running with --vfio-intr MSI flag */
 	const char *argv15[] = {prgname, "--file-prefix=intr",
-			eal_debug_logs,
+			eal_debug_logs, no_pci,
 			"--vfio-intr=msi"};
 
 	/* try running with --vfio-intr MSI-X flag */
 	const char *argv16[] = {prgname, "--file-prefix=intr",
-			eal_debug_logs,
+			eal_debug_logs, no_pci,
 			"--vfio-intr=msix"};
 
 	/* try running with --vfio-intr invalid flag */
 	const char *argv17[] = {prgname, "--file-prefix=intr",
-			eal_debug_logs,
+			eal_debug_logs, no_pci,
 			"--vfio-intr=invalid"};
 
 	/* With process type as auto-detect */
 	const char * const argv18[] = {prgname, "--file-prefix=auto",
-			eal_debug_logs,
+			eal_debug_logs, no_pci,
 			"--proc-type=auto"};
 
 	/* With process type as auto-detect with no-shconf */
-	const char * const argv19[] = {prgname, "--proc-type=auto", eal_debug_logs,
+	const char * const argv19[] = {prgname, "--proc-type=auto", eal_debug_logs, no_pci,
 			no_shconf, nosh_prefix, no_huge};
 
 	/* With process type as --create-uio-dev flag */
 	const char * const argv20[] = {prgname, "--file-prefix=uiodev",
-			eal_debug_logs,
+			eal_debug_logs, no_pci,
 			"--create-uio-dev"};
 
 	/* Try running with --huge-worker-stack flag */
@@ -1227,43 +1228,43 @@ test_file_prefix(void)
 			DEFAULT_MEM_SIZE, "--file-prefix=" memtest };
 
 	/* primary process with memtest1 and default mem mode */
-	const char *argv1[] = {prgname, eal_debug_logs, "-m",
+	const char *argv1[] = {prgname, eal_debug_logs, no_pci, "-m",
 			DEFAULT_MEM_SIZE, "--file-prefix=" memtest1 };
 
 	/* primary process with memtest1 and legacy mem mode */
-	const char *argv2[] = {prgname, eal_debug_logs, "-m",
+	const char *argv2[] = {prgname, eal_debug_logs, no_pci, "-m",
 			DEFAULT_MEM_SIZE, "--file-prefix=" memtest1,
 			"--legacy-mem" };
 
 	/* primary process with memtest2 and legacy mem mode */
-	const char *argv3[] = {prgname, eal_debug_logs, "-m",
+	const char *argv3[] = {prgname, eal_debug_logs, no_pci, "-m",
 			DEFAULT_MEM_SIZE, "--file-prefix=" memtest2,
 			"--legacy-mem" };
 
 	/* primary process with memtest2 and default mem mode */
-	const char *argv4[] = {prgname, eal_debug_logs, "-m",
+	const char *argv4[] = {prgname, eal_debug_logs, no_pci, "-m",
 			DEFAULT_MEM_SIZE, "--file-prefix=" memtest2 };
 
 	/* primary process with --in-memory mode */
-	const char * const argv5[] = {prgname, eal_debug_logs, "-m",
+	const char * const argv5[] = {prgname, eal_debug_logs, no_pci, "-m",
 		DEFAULT_MEM_SIZE, "--in-memory" };
 
 	/* primary process with memtest1 and --in-memory mode */
-	const char * const argv6[] = {prgname, eal_debug_logs, "-m",
+	const char * const argv6[] = {prgname, eal_debug_logs, no_pci, "-m",
 		DEFAULT_MEM_SIZE, "--in-memory",
 		"--file-prefix=" memtest1 };
 
 	/* primary process with parent file-prefix and --in-memory mode */
-	const char * const argv7[] = {prgname, eal_debug_logs, "-m",
+	const char * const argv7[] = {prgname, eal_debug_logs, no_pci, "-m",
 		DEFAULT_MEM_SIZE, "--in-memory", "--file-prefix", prefix };
 
 	/* primary process with memtest1 and --single-file-segments mode */
-	const char * const argv8[] = {prgname, eal_debug_logs, "-m",
+	const char * const argv8[] = {prgname, eal_debug_logs, no_pci, "-m",
 		DEFAULT_MEM_SIZE, "--single-file-segments",
 		"--file-prefix=" memtest1 };
 
 	/* primary process with memtest1 and --huge-unlink=never mode */
-	const char * const argv9[] = {prgname, eal_debug_logs, "-m",
+	const char * const argv9[] = {prgname, eal_debug_logs, no_pci, "-m",
 		DEFAULT_MEM_SIZE, "--huge-unlink=never",
 		"--file-prefix=" memtest1 };
 
@@ -1518,41 +1519,41 @@ test_memory_flags(void)
 			"-m", DEFAULT_MEM_SIZE};
 
 	/* valid -m flag */
-	const char *argv1[] = {prgname, eal_debug_logs,
+	const char *argv1[] = {prgname, eal_debug_logs, no_pci,
 			"--file-prefix=" memtest, "-m", DEFAULT_MEM_SIZE};
 
 	/* valid (zero) --socket-mem flag */
 	char arg2_socket_mem[SOCKET_MEM_STRLEN];
-	const char *argv2[] = {prgname, eal_debug_logs,
+	const char *argv2[] = {prgname, eal_debug_logs, no_pci,
 			"--file-prefix=" memtest, arg2_socket_mem};
 
 	/* invalid (incomplete) --socket-mem flag */
 	char arg3_socket_mem[SOCKET_MEM_STRLEN];
-	const char *argv3[] = {prgname, eal_debug_logs,
+	const char *argv3[] = {prgname, eal_debug_logs, no_pci,
 			"--file-prefix=" memtest, arg3_socket_mem};
 
 	/* invalid (mixed with invalid data) --socket-mem flag */
 	char arg4_socket_mem[SOCKET_MEM_STRLEN];
-	const char *argv4[] = {prgname, eal_debug_logs,
+	const char *argv4[] = {prgname, eal_debug_logs, no_pci,
 			"--file-prefix=" memtest, arg4_socket_mem};
 
 	/* invalid (with numeric value as last character) --socket-mem flag */
 	char arg5_socket_mem[SOCKET_MEM_STRLEN];
-	const char *argv5[] = {prgname, eal_debug_logs,
+	const char *argv5[] = {prgname, eal_debug_logs, no_pci,
 			"--file-prefix=" memtest, arg5_socket_mem};
 
 	/* invalid (with empty socket) --socket-mem flag */
 	char arg6_socket_mem[SOCKET_MEM_STRLEN];
-	const char *argv6[] = {prgname, eal_debug_logs,
+	const char *argv6[] = {prgname, eal_debug_logs, no_pci,
 			"--file-prefix=" memtest, arg6_socket_mem};
 
 	/* invalid (null) --socket-mem flag */
-	const char *argv7[] = {prgname, eal_debug_logs,
+	const char *argv7[] = {prgname, eal_debug_logs, no_pci,
 			"--file-prefix=" memtest, "--socket-mem="};
 
 	/* valid --socket-mem specified together with -m flag */
 	char arg8_socket_mem[SOCKET_MEM_STRLEN];
-	const char *argv8[] = {prgname, eal_debug_logs,
+	const char *argv8[] = {prgname, eal_debug_logs, no_pci,
 			"--file-prefix=" memtest, "-m", DEFAULT_MEM_SIZE,
 			arg8_socket_mem};
 
@@ -1570,12 +1571,12 @@ test_memory_flags(void)
 
 	/* invalid --socket-mem flag (with extra socket) */
 	char invalid_socket_mem[SOCKET_MEM_STRLEN];
-	const char *argv9[] = {prgname, eal_debug_logs,
+	const char *argv9[] = {prgname, eal_debug_logs, no_pci,
 			"--file-prefix=" memtest, invalid_socket_mem};
 
 	/* valid --socket-mem flag */
 	char valid_socket_mem[SOCKET_MEM_STRLEN];
-	const char *argv10[] = {prgname, eal_debug_logs,
+	const char *argv10[] = {prgname, eal_debug_logs, no_pci,
 			"--file-prefix=" memtest, valid_socket_mem};
 
 	if (launch_proc(argv0) != 0) {
-- 
2.51.0


  parent reply	other threads:[~2026-02-13 15:23 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-26 16:45 [PATCH 1/2] eal: add location info to interrupt error message Bruce Richardson
2026-01-26 16:45 ` [PATCH 2/2] test/eal_flags: add EAL debug logs to recursive calls Bruce Richardson
2026-02-03 14:17   ` David Marchand
2026-02-03 15:39     ` Bruce Richardson
2026-01-26 18:16 ` [PATCH 1/2] eal: add location info to interrupt error message Stephen Hemminger
2026-02-13 15:22 ` [PATCH v2 0/3] improve error reporting & resilience in unit tests Bruce Richardson
2026-02-13 15:22   ` [PATCH v2 1/3] eal: add location info to interrupt error message Bruce Richardson
2026-02-13 15:22   ` [PATCH v2 2/3] test/eal_flags: add EAL debug flags to recursive calls Bruce Richardson
2026-02-13 15:22   ` Bruce Richardson [this message]
2026-02-16 14:48   ` [PATCH v2 0/3] improve error reporting & resilience in unit tests 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=20260213152227.879170-4-bruce.richardson@intel.com \
    --to=bruce.richardson@intel.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.