[3/3] test: run lock-free stack tests when supported
Checks
Commit Message
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@semihalf.com>
Cc: stable@dpdk.org
---
app/test/test_stack.c | 4 ++++
app/test/test_stack_perf.c | 4 ++++
2 files changed, 8 insertions(+)
Comments
On Mon, Apr 12, 2021 at 10:29:01AM +0200, Stanislaw Kardach wrote:
> 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@semihalf.com>
> Cc: stable@dpdk.org
Acked-by: Olivier Matz <olivier.matz@6wind.com>
@@ -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);
@@ -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);