test/event: remove timer state check

Message ID 20230731132913.13920-1-pbhagavatula@marvell.com (mailing list archive)
State Accepted, archived
Delegated to: Jerin Jacob
Headers
Series test/event: remove timer state check |

Checks

Context Check Description
ci/checkpatch warning coding style issues
ci/loongarch-compilation success Compilation OK
ci/loongarch-unit-testing success Unit Testing PASS
ci/Intel-compilation success Compilation OK
ci/intel-Testing success Testing PASS
ci/github-robot: build success github build: passed
ci/intel-Functional success Functional PASS
ci/iol-mellanox-Performance success Performance Testing PASS
ci/iol-aarch-unit-testing success Testing PASS
ci/iol-unit-testing success Testing PASS
ci/iol-aarch64-compile-testing success Testing PASS
ci/iol-x86_64-compile-testing success Testing PASS
ci/iol-broadcom-Performance success Performance Testing PASS
ci/iol-intel-Performance success Performance Testing PASS
ci/iol-intel-Functional success Functional Testing PASS
ci/iol-broadcom-Functional success Functional Testing PASS
ci/iol-testing success Testing PASS
ci/iol-x86_64-unit-testing success Testing PASS

Commit Message

Pavan Nikhilesh Bhagavatula July 31, 2023, 1:29 p.m. UTC
  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(-)
  

Comments

Carrillo, Erik G Aug. 4, 2023, 4:26 p.m. UTC | #1
> -----Original Message-----
> From: pbhagavatula@marvell.com <pbhagavatula@marvell.com>
> Sent: Monday, July 31, 2023 8:29 AM
> To: jerinj@marvell.com; Carrillo, Erik G <erik.g.carrillo@intel.com>
> Cc: dev@dpdk.org; Pavan Nikhilesh <pbhagavatula@marvell.com>
> Subject: [PATCH] test/event: remove timer state check
> 
> 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>
> ---
Acked-by: Erik Gabriel Carrillo <erik.g.carrillo@intel.com>
  
Jerin Jacob Aug. 8, 2023, 12:48 p.m. UTC | #2
On Fri, Aug 4, 2023 at 9:56 PM Carrillo, Erik G
<erik.g.carrillo@intel.com> wrote:
>
> > -----Original Message-----
> > From: pbhagavatula@marvell.com <pbhagavatula@marvell.com>
> > Sent: Monday, July 31, 2023 8:29 AM
> > To: jerinj@marvell.com; Carrillo, Erik G <erik.g.carrillo@intel.com>
> > Cc: dev@dpdk.org; Pavan Nikhilesh <pbhagavatula@marvell.com>
> > Subject: [PATCH] test/event: remove timer state check
> >
> > 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>
> > ---
> Acked-by: Erik Gabriel Carrillo <erik.g.carrillo@intel.com>


Applied to dpdk-next-net-eventdev/for-main. Thanks
  

Patch

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,