From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 3A90342CB2; Mon, 19 Jun 2023 11:04:18 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id B9FF240DF8; Mon, 19 Jun 2023 11:04:17 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by mails.dpdk.org (Postfix) with ESMTP id B3ED340A81 for ; Mon, 19 Jun 2023 11:04:15 +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 35IMLfaW017905 for ; Mon, 19 Jun 2023 02:04:14 -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=fyA5hRr8KQCqiQi3fT2KKdukwtGzPhMAclVrQscy6LE=; b=K+1xqjgJC3X63sHggdKDC2LwuUUArsW0xhqxRDyKb8JQRhm5Pso1z48+SyByhWjNy+sl xTk6Em4waNC0D/dm180aBrHWBU6ed9t9eZsWMJuOUiwg2pedMvMoG4XB8wsYSKlvfJbT Yk4bpnIEHs57nf9EGtXbfn2+2TqJ0PZ0wwQB712AVedukq7pPG6wRT5OmZsHwxdUpR0N N5I8wE3r/Lfd/M3H7yngLy/OAk6Tyxax69cdCu3NWN4dzJiw/VkxoM4sqR0JbR+XZWsK n8aoWEXwVzGxqgDz6UGUCC2ghCmeAM92GjaG5a9EW3C4STepZbpjXZr4e9Auki4OY64z 3Q== Received: from dc5-exch01.marvell.com ([199.233.59.181]) by mx0a-0016f401.pphosted.com (PPS) with ESMTPS id 3r9a6n4wd4-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT) for ; Mon, 19 Jun 2023 02:04:14 -0700 Received: from DC5-EXCH02.marvell.com (10.69.176.39) by DC5-EXCH01.marvell.com (10.69.176.38) with Microsoft SMTP Server (TLS) id 15.0.1497.48; Mon, 19 Jun 2023 02:04:13 -0700 Received: from maili.marvell.com (10.69.176.80) by DC5-EXCH02.marvell.com (10.69.176.39) with Microsoft SMTP Server id 15.0.1497.48 via Frontend Transport; Mon, 19 Jun 2023 02:04:13 -0700 Received: from cavium-DT10.. (unknown [10.28.34.39]) by maili.marvell.com (Postfix) with ESMTP id 670B23F7051; Mon, 19 Jun 2023 02:04:11 -0700 (PDT) From: Volodymyr Fialko To: , Anoob Joseph , Volodymyr Fialko , Akhil Goyal CC: Subject: [PATCH] test/pdcp: remove side affect from assertion Date: Mon, 19 Jun 2023 11:04:03 +0200 Message-ID: <20230619090403.3420173-1-vfialko@marvell.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Proofpoint-ORIG-GUID: zPYF1Xc-KTcvA4Y0qmYyT8PO3HvcPQ-q X-Proofpoint-GUID: zPYF1Xc-KTcvA4Y0qmYyT8PO3HvcPQ-q 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-06-19_06,2023-06-16_01,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 Remove side affect from test assertion, to avoid different behaviour in non-debug build. Issues reported by coverity scan. Coverity issue: 385419, 385420 Fixes: 6f00462979ad ("test/pdcp: add timer expiry cases") Signed-off-by: Volodymyr Fialko --- app/test/test_pdcp.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app/test/test_pdcp.c b/app/test/test_pdcp.c index 423526380f..6c73c1db36 100644 --- a/app/test/test_pdcp.c +++ b/app/test/test_pdcp.c @@ -1338,8 +1338,9 @@ test_expiry_with_event_timer(const struct pdcp_test_conf *ul_conf) while (n != 1) { rte_delay_us(testsuite_params.min_resolution_ns / 1000); n = rte_event_dequeue_burst(testsuite_params.evdev, TEST_EV_PORT_ID, &event, 1, 0); - ASSERT_TRUE_OR_GOTO(nb_try-- > 0, exit, + ASSERT_TRUE_OR_GOTO(nb_try > 0, exit, "Dequeued unexpected timer expiry event: %i\n", n); + nb_try--; } ASSERT_TRUE_OR_GOTO(event.event_type == RTE_EVENT_TYPE_TIMER, exit, "Unexpected event type\n"); @@ -1433,8 +1434,9 @@ test_expiry_with_rte_timer(const struct pdcp_test_conf *ul_conf) while (timer_args.status != 1) { rte_delay_us(1); rte_timer_manage(); - ASSERT_TRUE_OR_GOTO(nb_try-- > 0, exit, "Bad expire handle status %i\n", + ASSERT_TRUE_OR_GOTO(nb_try > 0, exit, "Bad expire handle status %i\n", timer_args.status); + nb_try--; } ret = TEST_SUCCESS; -- 2.34.1