diff mbox series

[v3,2/2] test/rcu: address test case failure

Message ID 20190628184342.12260-2-honnappa.nagarahalli@arm.com
State New
Headers show
Series [v3,1/2] test/rcu: increase the size of num cores variable | expand

Commit Message

Honnappa Nagarahalli June 28, 2019, 6:43 p.m. UTC
Test case for rte_rcu_qsbr_get_memsize is written specifically
for 128 threads. Do not use RTE_MAX_LCORE as it changes for
different configurations.

Fixes: e6a14121f4ae ("test/rcu: remove arbitrary limit on max core count")
Cc: stable@dpdk.org

Signed-off-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>

Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>

Reviewed-by: David Marchand <david.marchand@redhat.com>

---
v3
- None

v2
- Changed the test case result validation (David)

 app/test/test_rcu_qsbr.c | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

-- 
2.17.1
diff mbox series

Patch

diff --git a/app/test/test_rcu_qsbr.c b/app/test/test_rcu_qsbr.c
index ae359a987..1d273e39d 100644
--- a/app/test/test_rcu_qsbr.c
+++ b/app/test/test_rcu_qsbr.c
@@ -89,13 +89,17 @@  test_rcu_qsbr_get_memsize(void)
 	sz = rte_rcu_qsbr_get_memsize(0);
 	TEST_RCU_QSBR_RETURN_IF_ERROR((sz != 1), "Get Memsize for 0 threads");
 
-	sz = rte_rcu_qsbr_get_memsize(RTE_MAX_LCORE);
+	sz = rte_rcu_qsbr_get_memsize(128);
 	/* For 128 threads,
 	 * for machines with cache line size of 64B - 8384
 	 * for machines with cache line size of 128 - 16768
 	 */
-	TEST_RCU_QSBR_RETURN_IF_ERROR((sz != 8384 && sz != 16768),
-		"Get Memsize");
+	if (RTE_CACHE_LINE_SIZE == 64)
+		TEST_RCU_QSBR_RETURN_IF_ERROR((sz != 8384),
+			"Get Memsize for 128 threads");
+	else if (RTE_CACHE_LINE_SIZE == 128)
+		TEST_RCU_QSBR_RETURN_IF_ERROR((sz != 16768),
+			"Get Memsize for 128 threads");
 
 	return 0;
 }