Re: [PATCH v2 6/7] test: increase size of memzone name

Bruce Richardson
2025-11-14T16:07:58Z

On Tue, Nov 11, 2025 at 02:17:23PM -0800, Stephen Hemminger wrote:
> The tests were using a name buffer of 20 characters which could
> overflow if number of memory zones got large. The upper limit
> is defined as RTE_MEMZONE_NAMESIZE so use that.
>
> Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>

> ---
> app/test/test_memzone.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/app/test/test_memzone.c b/app/test/test_memzone.c
> index 506725ea41..6586dad18d 100644
> --- a/app/test/test_memzone.c
> +++ b/app/test/test_memzone.c
> @@ -872,7 +872,7 @@ test_memzone_free(void)
> {
> const struct rte_memzone **mz;
> int i;
> - char name[20];
> + char name[RTE_MEMZONE_NAMESIZE];
> int rc = -1;
>
> mz = rte_calloc("memzone_test", rte_memzone_max_get() + 1,
> --
> 2.51.0
>