test/event: fix result of unsupported periodic timer
authorShijith Thotton <sthotton@marvell.com>
Fri, 7 May 2021 10:12:47 +0000 (15:42 +0530)
committerJerin Jacob <jerinj@marvell.com>
Sun, 9 May 2021 16:06:03 +0000 (18:06 +0200)
Test case setup should return -ENOTSUP, if it is not supported.

Fixes: 7d761b07fcf6 ("test/event: add unit tests for periodic timer")
Cc: stable@dpdk.org
Signed-off-by: Shijith Thotton <sthotton@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
app/test/test_event_timer_adapter.c

index c36ab32..121c2d9 100644 (file)
@@ -303,10 +303,8 @@ _timdev_setup(uint64_t max_tmo_ns, uint64_t bkt_tck_ns, uint64_t flags)
                                "failed to get adapter capabilities");
 
        if (flags & RTE_EVENT_TIMER_ADAPTER_F_PERIODIC &&
-           !(caps & RTE_EVENT_TIMER_ADAPTER_CAP_PERIODIC)) {
-               printf("Adapter does not support periodic timers\n");
-               return TEST_SKIPPED;
-       }
+           !(caps & RTE_EVENT_TIMER_ADAPTER_CAP_PERIODIC))
+               return -ENOTSUP;
 
        if (!(caps & RTE_EVENT_TIMER_ADAPTER_CAP_INTERNAL_PORT)) {
                timdev = rte_event_timer_adapter_create_ext(&config,