From: Stephen Hemminger <stephen@networkplumber.org>
To: dev@dpdk.org
Cc: Stephen Hemminger <stephen@networkplumber.org>,
stable@dpdk.org, Reshma Pattan <reshma.pattan@intel.com>,
Naga Suresh Somarowthu <naga.sureshx.somarowthu@intel.com>
Subject: [PATCH v3 8/8] test/pdump: check secondary process result
Date: Tue, 1 Dec 2026 11:31:17 -0800 [thread overview]
Message-ID: <20261201193243.1008280-9-stephen@networkplumber.org> (raw)
In-Reply-To: <20261201193243.1008280-1-stephen@networkplumber.org>
The test passed even when the secondary failed every pdump call.
process_dup() returns the raw status from wait(), which is positive
on failure, but the caller folded it in with ret |= and test_pdump()
only treats a negative value as an error.
The client secondary also never called rte_pdump_init(), so it had no
IPC handler for the requests the primary sends it.
Check the launched process for any non-zero status, and initialize
pdump in the client so the enable and disable paths are actually
exercised in the secondary.
Fixes: 086eb64db39e ("test/pdump: add unit test for pdump library")
Cc: stable@dpdk.org
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
app/test/test_pdump.c | 15 ++++++++++++++-
1 file changed, 14 insertions(+), 1 deletion(-)
diff --git a/app/test/test_pdump.c b/app/test/test_pdump.c
index f1c9bd9d7e..9d7e5d94fc 100644
--- a/app/test/test_pdump.c
+++ b/app/test/test_pdump.c
@@ -56,6 +56,12 @@ run_pdump_client_tests(void)
struct rte_eth_dev *eth_dev = NULL;
char poolname[] = "mbuf_pool_client";
+ ret = rte_pdump_init();
+ if (ret < 0) {
+ printf("rte_pdump_init failed\n");
+ return -1;
+ }
+
ret = test_get_mempool(&mp, poolname);
if (ret < 0)
return -1;
@@ -119,6 +125,11 @@ run_pdump_client_tests(void)
if (mp != NULL)
test_mp_free(mp);
+ if (rte_pdump_uninit() < 0) {
+ printf("rte_pdump_uninit failed\n");
+ return -1;
+ }
+
return ret;
}
@@ -192,7 +203,9 @@ run_pdump_server_tests(void)
snprintf(core_str, sizeof(core_str), "%u", rte_get_main_lcore());
ret = test_pdump_init();
- ret |= launch_p(argv1);
+ /* process_dup() returns the raw wait() status, not a negative errno */
+ if (launch_p(argv1) != 0)
+ ret = -1;
ret |= test_pdump_uninit();
return ret;
}
--
2.53.0
prev parent reply other threads:[~2026-12-01 19:33 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-28 14:16 [PATCH 0/4] pdump: fix capture on ports with hairpin queues Stephen Hemminger
2026-10-28 14:16 ` [PATCH 1/4] ethdev: reject hairpin queue in add first Rx callback Stephen Hemminger
2026-10-28 14:16 ` [PATCH 2/4] pdump: fix error code when adding callback fails Stephen Hemminger
2026-10-28 14:16 ` [PATCH 3/4] pdump: skip hairpin queues Stephen Hemminger
2026-10-28 14:16 ` [PATCH 4/4] pdump: undo partial enable on failure Stephen Hemminger
2026-11-27 21:07 ` [PATCH v2 0/6] pdump: fix bugs related to hairpin queues Stephen Hemminger
2026-11-27 21:07 ` [PATCH v2 1/6] ethdev: reject hairpin queue in add first Rx callback Stephen Hemminger
2026-11-27 21:07 ` [PATCH v2 2/6] pdump: fix error code when adding callback fails Stephen Hemminger
2026-11-27 21:07 ` [PATCH v2 3/6] pdump: validate queues before installing callbacks Stephen Hemminger
2026-11-27 21:07 ` [PATCH v2 4/6] pdump: release BPF filter on error Stephen Hemminger
2026-11-27 21:07 ` [PATCH v2 5/6] pdump: report secondary process failures Stephen Hemminger
2026-11-27 21:07 ` [PATCH v2 6/6] app/dumpcap: disable capture on the interface that failed Stephen Hemminger
2026-12-01 19:31 ` [PATCH v3 0/8] pdump: fix error handling on failed enable Stephen Hemminger
2026-12-01 19:31 ` [PATCH v3 1/8] ethdev: reject hairpin queue in add first Rx callback Stephen Hemminger
2026-12-01 19:31 ` [PATCH v3 2/8] pdump: fix error code when adding callback fails Stephen Hemminger
2026-12-01 19:31 ` [PATCH v3 3/8] pdump: validate queues before installing callbacks Stephen Hemminger
2026-12-01 19:31 ` [PATCH v3 4/8] pdump: release BPF filter on error Stephen Hemminger
2026-12-01 19:31 ` [PATCH v3 5/8] eal: fix IPC request when no handler is registered Stephen Hemminger
2026-12-01 19:31 ` [PATCH v3 6/8] test/mp: check request with no registered handler Stephen Hemminger
2026-12-01 19:31 ` [PATCH v3 7/8] pdump: report secondary process failures Stephen Hemminger
2026-12-01 19:31 ` Stephen Hemminger [this message]
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=20261201193243.1008280-9-stephen@networkplumber.org \
--to=stephen@networkplumber.org \
--cc=dev@dpdk.org \
--cc=naga.sureshx.somarowthu@intel.com \
--cc=reshma.pattan@intel.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