DPDK patches and discussions
 help / color / mirror / Atom feed
From: <pbhagavatula@marvell.com>
To: <jerinj@marvell.com>, Erik Gabriel Carrillo <erik.g.carrillo@intel.com>
Cc: <dev@dpdk.org>, Pavan Nikhilesh <pbhagavatula@marvell.com>
Subject: [PATCH] test/event: remove timer state check
Date: Mon, 31 Jul 2023 18:59:13 +0530	[thread overview]
Message-ID: <20230731132913.13920-1-pbhagavatula@marvell.com> (raw)

From: Pavan Nikhilesh <pbhagavatula@marvell.com>

Remove checking if timer state is set to RTE_EVENT_TIMER_NOT_ARMED
after the timer has expired as certain timer device implementations
might not have access to the rte_event_timer handle of a timer event.

Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
---
 app/test/test_event_timer_adapter.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/app/test/test_event_timer_adapter.c b/app/test/test_event_timer_adapter.c
index 510bebcf86..2bc2e026a9 100644
--- a/app/test/test_event_timer_adapter.c
+++ b/app/test/test_event_timer_adapter.c
@@ -1944,9 +1944,9 @@ test_timer_ticks_remaining(void)
 
 	TEST_ASSERT_EQUAL(timeout_event_dequeue(&ev, 1, WAIT_TICKS(1)), 1,
 			  "Armed timer failed to trigger.");
-	TEST_ASSERT_EQUAL(ev_tim->state, RTE_EVENT_TIMER_NOT_ARMED,
-			  "Improper timer state set expected %d returned %d",
-			  RTE_EVENT_TIMER_NOT_ARMED, ev_tim->state);
+
+	if (ev_tim->state != RTE_EVENT_TIMER_NOT_ARMED)
+		ev_tim->state = RTE_EVENT_TIMER_NOT_ARMED;
 
 	/* Test that timer that fired returns error */
 	TEST_ASSERT_FAIL(rte_event_timer_remaining_ticks_get(timdev, ev_tim,
-- 
2.25.1


             reply	other threads:[~2023-07-31 13:29 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-31 13:29 pbhagavatula [this message]
2023-08-04 16:26 ` Carrillo, Erik G
2023-08-08 12:48   ` Jerin Jacob

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230731132913.13920-1-pbhagavatula@marvell.com \
    --to=pbhagavatula@marvell.com \
    --cc=dev@dpdk.org \
    --cc=erik.g.carrillo@intel.com \
    --cc=jerinj@marvell.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).