diff options
Diffstat (limited to 'test/test/test_eal_flags.c')
-rw-r--r-- | test/test/test_eal_flags.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/test/test/test_eal_flags.c b/test/test/test_eal_flags.c index 310109e6..473ea113 100644 --- a/test/test/test_eal_flags.c +++ b/test/test/test_eal_flags.c @@ -61,7 +61,7 @@ #define memtest "memtest" #define memtest1 "memtest1" #define memtest2 "memtest2" -#define SOCKET_MEM_STRLEN (RTE_MAX_NUMA_NODES * 10) +#define SOCKET_MEM_STRLEN (RTE_MAX_NUMA_NODES * 20) #define launch_proc(ARGV) process_dup(ARGV, \ sizeof(ARGV)/(sizeof(ARGV[0])), __func__) @@ -1166,10 +1166,11 @@ test_memory_flags(void) #ifdef RTE_EXEC_ENV_BSDAPP int i, num_sockets = 1; #else - int i, num_sockets = get_number_of_sockets(); + int i, num_sockets = RTE_MIN(get_number_of_sockets(), + RTE_MAX_NUMA_NODES); #endif - if (num_sockets <= 0 || num_sockets > RTE_MAX_NUMA_NODES) { + if (num_sockets <= 0) { printf("Error - cannot get number of sockets!\n"); return -1; } |