[PATCH v10 3/9] test: refactor file prefix arg handling

Marat Khalili marat.khalili at huawei.com
Fri Jan 2 15:03:58 CET 2026


Please see a couple of nits inline.

> -----Original Message-----
> From: Stephen Hemminger <stephen at networkplumber.org>
> Sent: Monday 29 December 2025 21:59
> To: dev at dpdk.org
> Cc: Stephen Hemminger <stephen at networkplumber.org>
> Subject: [PATCH v10 3/9] test: refactor file prefix arg handling
> 
> Make setting up --file-prefix arg logic into a function,
> and avoid impossible case of file prefix path causing overflow
> of string.
> 
> Signed-off-by: Stephen Hemminger <stephen at networkplumber.org>
> ---
>  app/test/process.h        |   8 +--
>  app/test/test_eal_flags.c | 132 ++++++++++----------------------------
>  2 files changed, 37 insertions(+), 103 deletions(-)
> 

// snip

> diff --git a/app/test/test_eal_flags.c b/app/test/test_eal_flags.c
> index e32f83d3c8..12cf123e81 100644
> --- a/app/test/test_eal_flags.c
> +++ b/app/test/test_eal_flags.c
> @@ -121,6 +121,8 @@ test_misc_flags(void)
>  #define no_shconf "--no-shconf"
>  #define allow "--allow"
>  #define vdev "--vdev"
> +#define file_prefix "--file-prefix"
> +

Are we using it anywhere?

// snip

> @@ -853,6 +802,18 @@ test_no_huge_flag(void)
>  	const char *argv2[] = {prgname, prefix, no_huge,
>  			"-m", DEFAULT_MEM_SIZE};
> 
> +	if (launch_proc(argv1) != 0) {
> +		printf("Error - process did not run ok with --no-huge flag\n");
> +		return -1;
> +	}
> +	if (launch_proc(argv2) != 0) {
> +		printf("Error - process did not run ok with --no-huge and -m flags\n");
> +		return -1;
> +	}
> +#ifdef RTE_EXEC_ENV_FREEBSD
> +	/* no other tests are applicable to FreeBSD */
> +	return 0;
> +#else
>  	/* With --no-huge and --socket-mem */
>  	const char *argv3[] = {prgname, prefix, no_huge,
>  			"--socket-mem=" DEFAULT_MEM_SIZE};
> @@ -867,19 +828,6 @@ test_no_huge_flag(void)
>  	const char * const argv6[] = {prgname, prefix, no_huge,
>  			"--huge-worker-stack=512"};
> 
> -	if (launch_proc(argv1) != 0) {
> -		printf("Error - process did not run ok with --no-huge flag\n");
> -		return -1;
> -	}
> -	if (launch_proc(argv2) != 0) {
> -		printf("Error - process did not run ok with --no-huge and -m flags\n");
> -		return -1;
> -	}
> -#ifdef RTE_EXEC_ENV_FREEBSD
> -	/* no other tests are applicable to FreeBSD */
> -	return 0;
> -#endif
> -
>  	if (launch_proc(argv3) == 0) {
>  		printf("Error - process run ok with --no-huge and --socket-mem "
>  				"flags\n");
> @@ -898,6 +846,7 @@ test_no_huge_flag(void)
>  		printf("Error - process run ok with --no-huge and --huge-worker-stack=size flags");
>  		return -1;
>  	}
> +#endif
>  	return 0;

Duplicate return in FreeBSD case?

>  }

// snip the rest


More information about the dev mailing list