[3/3] app/test: fix checking return value

Message ID 20231010062304.205933-4-chaoyong.he@corigine.com (mailing list archive)
State Accepted, archived
Delegated to: Ferruh Yigit
Headers
Series Fix three coverity issues of bond PMD |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/loongarch-compilation success Compilation OK
ci/loongarch-unit-testing success Unit Testing PASS
ci/Intel-compilation success Compilation OK
ci/github-robot: build success github build: passed
ci/intel-Testing success Testing PASS
ci/intel-Functional success Functional PASS
ci/iol-mellanox-Performance success Performance Testing PASS
ci/iol-intel-Performance success Performance Testing PASS
ci/iol-unit-arm64-testing success Testing PASS
ci/iol-compile-amd64-testing success Testing PASS
ci/iol-compile-arm64-testing success Testing PASS
ci/iol-unit-amd64-testing success Testing PASS
ci/iol-sample-apps-testing success Testing PASS
ci/iol-broadcom-Functional success Functional Testing PASS
ci/iol-intel-Functional success Functional Testing PASS
ci/iol-broadcom-Performance success Performance Testing PASS

Commit Message

Chaoyong He Oct. 10, 2023, 6:23 a.m. UTC
  From: Long Wu <long.wu@corigine.com>

CI found the function without checking return value in this place.

Coverity issue: 403101
Fixes: 92073ef961ee ("bond: unit tests")
Cc: declan.doherty@intel.com
Cc: stable@dpdk.org

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

Comments

Ferruh Yigit Oct. 31, 2023, 2:52 p.m. UTC | #1
On 10/10/2023 7:23 AM, Chaoyong He wrote:
> From: Long Wu <long.wu@corigine.com>
> 
> CI found the function without checking return value in this place.
> 
> Coverity issue: 403101
> Fixes: 92073ef961ee ("bond: unit tests")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Long Wu <long.wu@corigine.com>
> Reviewed-by: Chaoyong He <chaoyong.he@corigine.com>
> Reviewed-by: Peng Zhang <peng.zhang@corigine.com>
>

Acked-by: Ferruh Yigit <ferruh.yigit@amd.com>

Applied to dpdk-next-net/main, thanks.
  

Patch

diff --git a/app/test/test_link_bonding.c b/app/test/test_link_bonding.c
index 4d715c4465..4d54706c21 100644
--- a/app/test/test_link_bonding.c
+++ b/app/test/test_link_bonding.c
@@ -449,7 +449,8 @@  test_add_already_bonding_member_to_bonding_device(void)
 	uint16_t members[RTE_MAX_ETHPORTS];
 	char pmd_name[RTE_ETH_NAME_MAX_LEN];
 
-	test_add_member_to_bonding_device();
+	TEST_ASSERT_SUCCESS(test_add_member_to_bonding_device(),
+			"Failed to add member to bonding device");
 
 	current_member_count = rte_eth_bond_members_get(test_params->bonding_port_id,
 			members, RTE_MAX_ETHPORTS);