DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH v1] test/event: fix return value of timer test setup
@ 2021-05-07 10:12 Shijith Thotton
  2021-05-09 16:06 ` Jerin Jacob
  0 siblings, 1 reply; 2+ messages in thread
From: Shijith Thotton @ 2021-05-07 10:12 UTC (permalink / raw)
  To: dev; +Cc: Shijith Thotton, Erik Gabriel Carrillo, Jerin Jacob, Pavan Nikhilesh

Test case setup should return -ENOTSUP, if it is not supported.

Fixes: 7d761b07fcf6 ("test/event: add unit tests for periodic timer")

Signed-off-by: Shijith Thotton <sthotton@marvell.com>
---
 app/test/test_event_timer_adapter.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/app/test/test_event_timer_adapter.c b/app/test/test_event_timer_adapter.c
index c36ab32ac..121c2d93e 100644
--- a/app/test/test_event_timer_adapter.c
+++ b/app/test/test_event_timer_adapter.c
@@ -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,
-- 
2.25.1


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [dpdk-dev] [PATCH v1] test/event: fix return value of timer test setup
  2021-05-07 10:12 [dpdk-dev] [PATCH v1] test/event: fix return value of timer test setup Shijith Thotton
@ 2021-05-09 16:06 ` Jerin Jacob
  0 siblings, 0 replies; 2+ messages in thread
From: Jerin Jacob @ 2021-05-09 16:06 UTC (permalink / raw)
  To: Shijith Thotton
  Cc: dpdk-dev, Erik Gabriel Carrillo, Jerin Jacob, Pavan Nikhilesh

On Fri, May 7, 2021 at 3:42 PM Shijith Thotton <sthotton@marvell.com> wrote:
>
> 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>
Applied to dpdk-next-eventdev/for-main. Thanks.

> ---
>  app/test/test_event_timer_adapter.c | 6 ++----
>  1 file changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/app/test/test_event_timer_adapter.c b/app/test/test_event_timer_adapter.c
> index c36ab32ac..121c2d93e 100644
> --- a/app/test/test_event_timer_adapter.c
> +++ b/app/test/test_event_timer_adapter.c
> @@ -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,
> --
> 2.25.1
>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-05-09 16:07 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-07 10:12 [dpdk-dev] [PATCH v1] test/event: fix return value of timer test setup Shijith Thotton
2021-05-09 16:06 ` Jerin Jacob

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).