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

Message ID 20190410072532.17182-1-vattunuru@marvell.com (mailing list archive)
State Superseded, archived
Delegated to: Thomas Monjalon
Headers
Series [v1,1/1] app/test: fix --socket-mem option in eal flag autotest |

Checks

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

Commit Message

Vamsi Krishna Attunuru April 10, 2019, 7:25 a.m. UTC
  "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. UTC | #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",