[PATCH 1/3] app/test: fix control flow issue

Chaoyong He chaoyong.he at corigine.com
Tue Oct 10 08:23:02 CEST 2023


From: Long Wu <long.wu at corigine.com>

CI found that execution cannot reach the expression "-1"
inside this statement.

Coverity issue: 403097
Fixes: 5e41ab250dfa ("app/test: unit tests for bonding mode 4")
Cc: tomaszx.kulasek at intel.com
Cc: stable at dpdk.org

Signed-off-by: Long Wu <long.wu at corigine.com>
Reviewed-by: Chaoyong He <chaoyong.he at corigine.com>
Reviewed-by: Peng Zhang <peng.zhang at corigine.com>
---
 app/test/test_link_bonding_mode4.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/app/test/test_link_bonding_mode4.c b/app/test/test_link_bonding_mode4.c
index 645fc1e0d4..ff13dbed93 100644
--- a/app/test/test_link_bonding_mode4.c
+++ b/app/test/test_link_bonding_mode4.c
@@ -641,8 +641,7 @@ bond_handshake(void)
 	/* If response didn't send - report failure */
 	TEST_ASSERT_EQUAL(all_members_done, 1, "Bond handshake failed\n");
 
-	/* If flags doesn't match - report failure */
-	return all_members_done == 1 ? TEST_SUCCESS : TEST_FAILED;
+	return TEST_SUCCESS;
 }
 
 #define TEST_LACP_MEMBER_COUT RTE_DIM(test_params.member_ports)
-- 
2.39.1



More information about the dev mailing list