From: Marat Khalili <marat.khalili@huawei.com>
To: Bruce Richardson <bruce.richardson@intel.com>,
"dev@dpdk.org" <dev@dpdk.org>
Cc: "stable@dpdk.org" <stable@dpdk.org>
Subject: RE: [PATCH v2 1/2] app/test: fix ifdefs in header for managing subprocesses
Date: Thu, 26 Feb 2026 17:04:59 +0000 [thread overview]
Message-ID: <000bae692fb04389bf642d5905185c2a@huawei.com> (raw)
In-Reply-To: <20260225162044.3670045-1-bruce.richardson@intel.com>
> -----Original Message-----
> From: Bruce Richardson <bruce.richardson@intel.com>
> Sent: Wednesday 25 February 2026 16:21
> To: dev@dpdk.org
> Cc: Bruce Richardson <bruce.richardson@intel.com>; stable@dpdk.org
> Subject: [PATCH v2 1/2] app/test: fix ifdefs in header for managing subprocesses
>
> The #endif for the #ifdef Linux block to add the "get_current_prefix()"
> and the "file_prefix_arg()" functions to process.h was on the wrong
> line, leaving a stray "}" outside the block. Fix this and in the process
> (no pun intended) simplify the #ifdefs to just a non-Linux and a Linux
> block, removing one level of #ifdefs.
>
> Fixes: f17b6eacf00a ("test: avoid file prefix overflow")
> Cc: stable@dpdk.org
>
> Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
> ---
> app/test/process.h | 14 +++++---------
> 1 file changed, 5 insertions(+), 9 deletions(-)
>
> diff --git a/app/test/process.h b/app/test/process.h
> index 402dc4f96f..a21cdfd46d 100644
> --- a/app/test/process.h
> +++ b/app/test/process.h
> @@ -225,17 +225,14 @@ process_dup(const char *const argv[], int numargs, const char *env_value)
> return status;
> }
>
> -/* FreeBSD doesn't support file prefixes, so no argument passed. */
> -#ifdef RTE_EXEC_ENV_FREEBSD
> +/* Only Linux supports file prefixes. */
> +#ifndef RTE_EXEC_ENV_LINUX
> static inline const char *
> file_prefix_arg(void)
> {
> - /* BSD target doesn't support prefixes at this point */
> return "";
> }
> -#else
> -
> -#ifdef RTE_EXEC_ENV_LINUX
> +#else /* RTE_EXEC_ENV_LINUX */
> static inline char *
> get_current_prefix(char *prefix, int size)
> {
> @@ -253,7 +250,7 @@ get_current_prefix(char *prefix, int size)
> return prefix;
> }
>
> -/* Return a --file-prefix=XXXX argument or NULL */
> +/* Return a --file-prefix=XXXX argument */
> static inline const char *
> file_prefix_arg(void)
> {
> @@ -267,8 +264,7 @@ file_prefix_arg(void)
>
> snprintf(prefix, sizeof(prefix), "--file-prefix=%s", tmp);
> return prefix;
> -#endif
> }
> -#endif
> +#endif /* RTE_EXEC_ENV_LINUX */
>
> #endif /* _PROCESS_H_ */
> --
> 2.51.0
Acked-by: Marat Khalili <marat.khalili@huawei.com>
Tested on Linux.
prev parent reply other threads:[~2026-02-26 17:05 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-20 17:49 [PATCH] app/test: simplify getting the current file prefix Bruce Richardson
2026-02-23 11:21 ` Marat Khalili
2026-02-23 16:56 ` Bruce Richardson
2026-02-25 16:20 ` [PATCH v2 1/2] app/test: fix ifdefs in header for managing subprocesses Bruce Richardson
2026-02-25 16:20 ` [PATCH v2 2/2] app/test: simplify getting the current file prefix Bruce Richardson
2026-03-05 16:35 ` David Marchand
2026-02-26 17:04 ` Marat Khalili [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=000bae692fb04389bf642d5905185c2a@huawei.com \
--to=marat.khalili@huawei.com \
--cc=bruce.richardson@intel.com \
--cc=dev@dpdk.org \
--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