From patchwork Mon Jul 31 13:29:13 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pavan Nikhilesh Bhagavatula X-Patchwork-Id: 129748 X-Patchwork-Delegate: jerinj@marvell.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 7C26D42FA3; Mon, 31 Jul 2023 15:29:25 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 1C9EC42D13; Mon, 31 Jul 2023 15:29:25 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by mails.dpdk.org (Postfix) with ESMTP id D0AA24067B for ; Mon, 31 Jul 2023 15:29:23 +0200 (CEST) Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 36VDPOOo025464; Mon, 31 Jul 2023 06:29:21 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : mime-version : content-transfer-encoding : content-type; s=pfpt0220; bh=PRGlYr6K1KSUsFOb1RoBLAufVecPh3sDEkSkRvI/nxA=; b=D9Tc1JS7NVqFywMIrHpmoBWo51+bGOukAwKrSKRRC1IwCF7/bL8m3Jk513evOQU+GRwu pw4BlEwfsKYgBaWqMCX6Ckx7R869GSedWEvMXUE23x8MWvbsQU6SJg1VPZyY5ZqrW8kT +/APBgTh2g3a4K8q9n4+zBhKWSBq4ASdqFLfsUro/2VldSfDmt68ncjtzQXARjkx+nFB BEoHWE7e0Yj/1aQVYuXN/0CbC3dPz4AH0bI3EMK5HNR9KwIJ5h49+nhPF2seFwAbnsAZ Bui3l54ay1P+aVdCLG6iHjV0nMfFeEFFlP9ypNpmZMIxWDIYdyBBfUzgk73bkKA6AgbM Lw== Received: from dc5-exch01.marvell.com ([199.233.59.181]) by mx0a-0016f401.pphosted.com (PPS) with ESMTPS id 3s6du080k9-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Mon, 31 Jul 2023 06:29:20 -0700 Received: from DC5-EXCH01.marvell.com (10.69.176.38) by DC5-EXCH01.marvell.com (10.69.176.38) with Microsoft SMTP Server (TLS) id 15.0.1497.48; Mon, 31 Jul 2023 06:29:19 -0700 Received: from maili.marvell.com (10.69.176.80) by DC5-EXCH01.marvell.com (10.69.176.38) with Microsoft SMTP Server id 15.0.1497.48 via Frontend Transport; Mon, 31 Jul 2023 06:29:19 -0700 Received: from MININT-80QBFE8.corp.innovium.com (MININT-80QBFE8.marvell.com [10.28.164.106]) by maili.marvell.com (Postfix) with ESMTP id 9072A3F70CF; Mon, 31 Jul 2023 06:29:17 -0700 (PDT) From: To: , Erik Gabriel Carrillo CC: , Pavan Nikhilesh Subject: [PATCH] test/event: remove timer state check Date: Mon, 31 Jul 2023 18:59:13 +0530 Message-ID: <20230731132913.13920-1-pbhagavatula@marvell.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-Proofpoint-GUID: zJ2qfUJFl6PgOaWNVx5V0ClatJSIPfTr X-Proofpoint-ORIG-GUID: zJ2qfUJFl6PgOaWNVx5V0ClatJSIPfTr X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.254,Aquarius:18.0.957,Hydra:6.0.591,FMLib:17.11.176.26 definitions=2023-07-31_06,2023-07-31_02,2023-05-22_02 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org From: Pavan Nikhilesh 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 Acked-by: Erik Gabriel Carrillo --- 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,