[v1,1/1] app/test: fix --socket-mem option in eal flag autotest

Message ID 20190410072532.17182-1-vattunuru@marvell.com
State Superseded
Delegated to: Thomas Monjalon
Headers show
Series
  • [v1,1/1] app/test: fix --socket-mem option in eal flag autotest
Related show

Checks

Context Check Description
ci/mellanox-Performance-Testing success Performance Testing PASS
ci/intel-Performance-Testing success Performance Testing PASS
ci/Intel-compilation success Compilation OK
ci/checkpatch success coding style OK

Commit Message

Vamsi Krishna Attunuru April 10, 2019, 7:25 a.m.
"argv2[]" positive test case fails with RTE_MAX_NUMA_NODES=1 config
because of "--socket-mem=0,0,0,0" option, which passes memory sizes
for multiple sockets. This patch fixes the issue by passing memory
size for node 0 alone.

Signed-off-by: Vamsi Attunuru <vattunuru@marvell.com>
---
 app/test/test_eal_flags.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

David Marchand April 10, 2019, 8:26 a.m. | #1
On Wed, Apr 10, 2019 at 9:26 AM Vamsi Attunuru <vattunuru@marvell.com>
wrote:

> "argv2[]" positive test case fails with RTE_MAX_NUMA_NODES=1 config
> because of "--socket-mem=0,0,0,0" option, which passes memory sizes
> for multiple sockets. This patch fixes the issue by passing memory
> size for node 0 alone.
>

How about modifying the test so that it also validates the format is
consistent with the RTE_MAX_NUMA_NODES value ?

Patch

diff --git a/app/test/test_eal_flags.c b/app/test/test_eal_flags.c
index 9112c96..90df7b3 100644
--- a/app/test/test_eal_flags.c
+++ b/app/test/test_eal_flags.c
@@ -1161,7 +1161,7 @@  test_memory_flags(void)
 
 	/* valid (zero) --socket-mem flag */
 	const char *argv2[] = {prgname, "-c", "10", "-n", "2",
-			"--file-prefix=" memtest, "--socket-mem=0,0,0,0"};
+			"--file-prefix=" memtest, "--socket-mem=0"};
 
 	/* invalid (incomplete) --socket-mem flag */
 	const char *argv3[] = {prgname, "-c", "10", "-n", "2",