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

Stephen Hemminger
2025-11-11T22:19:33Z

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>
---
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