From: Honnappa Nagarahalli Date: Fri, 28 Jun 2019 18:43:42 +0000 (-0500) Subject: test/rcu: fix test case X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;ds=sidebyside;h=21c17c155686c6e98e70df5b2dae7bb580f4adb6;hp=104dbec2081a50dac9dc53b474a5acd8c5e4d296;p=dpdk.git test/rcu: fix test case 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 Reviewed-by: Ruifeng Wang Reviewed-by: David Marchand --- diff --git a/app/test/test_rcu_qsbr.c b/app/test/test_rcu_qsbr.c index ae359a9873..1d273e39d2 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; }