[dpdk-dev] [PATCH 3/3] test: run lock-free stack tests when supported
Stanislaw Kardach
kda at semihalf.com
Mon Apr 12 10:29:01 CEST 2021
Use the recently added RTE_STACK_LF_SUPPORTED flag to disable the
lock-free stack tests at the compile time.
Perf test doesn't fail because rte_ring_create() succeeds, however
marking this test as skipped gives a better indication of what actually
was tested.
Signed-off-by: Stanislaw Kardach <kda at semihalf.com>
Cc: stable at dpdk.org
---
app/test/test_stack.c | 4 ++++
app/test/test_stack_perf.c | 4 ++++
2 files changed, 8 insertions(+)
diff --git a/app/test/test_stack.c b/app/test/test_stack.c
index 02422a32d..00efb38e2 100644
--- a/app/test/test_stack.c
+++ b/app/test/test_stack.c
@@ -373,7 +373,11 @@ test_stack(void)
static int
test_lf_stack(void)
{
+#if defined(RTE_STACK_LF_SUPPORTED)
return __test_stack(RTE_STACK_F_LF);
+#else
+ return TEST_SKIPPED;
+#endif
}
REGISTER_TEST_COMMAND(stack_autotest, test_stack);
diff --git a/app/test/test_stack_perf.c b/app/test/test_stack_perf.c
index 3590625c4..4ee40d5d1 100644
--- a/app/test/test_stack_perf.c
+++ b/app/test/test_stack_perf.c
@@ -349,7 +349,11 @@ test_stack_perf(void)
static int
test_lf_stack_perf(void)
{
+#if defined(RTE_STACK_LF_SUPPORTED)
return __test_stack_perf(RTE_STACK_F_LF);
+#else
+ return TEST_SKIPPED;
+#endif
}
REGISTER_TEST_COMMAND(stack_perf_autotest, test_stack_perf);
--
2.27.0
More information about the dev
mailing list