summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIlya Maximets <i.maximets@samsung.com>2019-01-25 10:55:58 +0300
committerThomas Monjalon <thomas@monjalon.net>2019-01-26 19:24:04 +0100
commit10d66cee5bf51bbd27d58b565b3340282e18ef07 (patch)
tree944a2344fa6fedd03d5399527d75649fb225c802
parent0a703f0f36c11b6f23fad4fab9e79c308811329d (diff)
downloaddpdk-10d66cee5bf51bbd27d58b565b3340282e18ef07.zip
dpdk-10d66cee5bf51bbd27d58b565b3340282e18ef07.tar.gz
dpdk-10d66cee5bf51bbd27d58b565b3340282e18ef07.tar.xz
test: check zero socket memory as valid
Dynamic memory mode allowes zero socket-mem because all the required memory could be allocated on demand. Fixes: 0a703f0f36c1 ("eal/linux: fix parsing zero socket memory and limits") Cc: stable@dpdk.org Reported-by: Shuai Zhu <shuaix.zhu@intel.com> Signed-off-by: Ilya Maximets <i.maximets@samsung.com> Reviewed-by: David Marchand <david.marchand@redhat.com> Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
-rw-r--r--test/test/test_eal_flags.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/test/test/test_eal_flags.c b/test/test/test_eal_flags.c
index e3a60c7..81e345b 100644
--- a/test/test/test_eal_flags.c
+++ b/test/test/test_eal_flags.c
@@ -1158,7 +1158,7 @@ test_memory_flags(void)
const char *argv1[] = {prgname, "-c", "10", "-n", "2",
"--file-prefix=" memtest, "-m", DEFAULT_MEM_SIZE};
- /* invalid (zero) --socket-mem flag */
+ /* valid (zero) --socket-mem flag */
const char *argv2[] = {prgname, "-c", "10", "-n", "2",
"--file-prefix=" memtest, "--socket-mem=0,0,0,0"};
@@ -1256,8 +1256,8 @@ test_memory_flags(void)
printf("Error - process failed with valid -m flag!\n");
return -1;
}
- if (launch_proc(argv2) == 0) {
- printf("Error - process run ok with invalid (zero) --socket-mem!\n");
+ if (launch_proc(argv2) != 0) {
+ printf("Error - process failed with valid (zero) --socket-mem!\n");
return -1;
}