From: Bruce Richardson <bruce.richardson@intel.com>
To: dev@dpdk.org
Cc: anatoly.burakov@intel.com, Bruce Richardson <bruce.richardson@intel.com>
Subject: [PATCH 1/3] app/test: add extra logging for recursive calls
Date: Tue, 20 Jan 2026 11:25:50 +0000 [thread overview]
Message-ID: <20260120112552.921243-2-bruce.richardson@intel.com> (raw)
In-Reply-To: <20260120112552.921243-1-bruce.richardson@intel.com>
When the test binary calls itself recursively e.g. when testing
multi-process, print out a few extra details on what is being done and
returned to help with debugging in case of any issues. As part of this,
if rte_eal_init ever fails, explicitly print out the failure code.
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---
app/test/test.c | 14 ++++++++++++--
1 file changed, 12 insertions(+), 2 deletions(-)
diff --git a/app/test/test.c b/app/test/test.c
index 8a4598baee..58ef52f312 100644
--- a/app/test/test.c
+++ b/app/test/test.c
@@ -92,8 +92,13 @@ do_recursive_call(void)
if (recursive_call == NULL)
return -1;
for (i = 0; i < RTE_DIM(actions); i++) {
- if (strcmp(actions[i].env_var, recursive_call) == 0)
- return (actions[i].action_fn)();
+ if (strcmp(actions[i].env_var, recursive_call) == 0) {
+ printf("Calling recursive action for %s\n", recursive_call);
+ int ret = actions[i].action_fn();
+ printf("Returned from recursive action for %s with %d\n",
+ recursive_call, ret);
+ return ret;
+ }
}
printf("ERROR - missing action to take for %s\n", recursive_call);
return -1;
@@ -146,6 +151,7 @@ main(int argc, char **argv)
} else
ret = rte_eal_init(argc, argv);
if (ret < 0) {
+ printf("Error with EAL initialization, ret = %d\n", ret);
ret = -1;
goto out;
}
@@ -259,10 +265,14 @@ main(int argc, char **argv)
ret = 0;
out:
+ if (recursive_call != NULL)
+ printf("Cleaning up %s recursive instance\n", argv[0]);
#ifdef RTE_LIB_TIMER
rte_timer_subsystem_finalize();
#endif
rte_eal_cleanup();
+ if (recursive_call != NULL)
+ printf("%s recursive instance returning %d\n", argv[0], ret);
return ret;
}
--
2.51.0
next prev parent reply other threads:[~2026-01-20 11:26 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-20 11:25 [PATCH 0/3] improve debug output for EAL flags unit tests Bruce Richardson
2026-01-20 11:25 ` Bruce Richardson [this message]
2026-01-20 11:25 ` [PATCH 2/3] test/eal_flags: add line numbers to error messages Bruce Richardson
2026-01-20 15:03 ` Stephen Hemminger
2026-01-20 15:22 ` Bruce Richardson
2026-01-20 11:25 ` [PATCH 3/3] test/eal_flags: add extra logging for file prefix tests Bruce Richardson
2026-01-21 9:14 ` [PATCH 0/3] improve debug output for EAL flags unit tests David Marchand
2026-01-23 11:08 ` David Marchand
2026-01-23 11:28 ` 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=20260120112552.921243-2-bruce.richardson@intel.com \
--to=bruce.richardson@intel.com \
--cc=anatoly.burakov@intel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox