Acked-by: Chengwen Feng <fengcheng...@huawei.com> On 2024/11/22 2:23, Stephen Hemminger wrote: > The first argument of 'memcmp' function was equal to the second argument. > Therefore ASSERT would always be true. > > Link: https://pvs-studio.com/en/blog/posts/cpp/1179/ > > Fixes: 92073ef961ee ("bond: unit tests") > Cc: declan.dohe...@intel.com > Cc: sta...@dpdk.org > > Signed-off-by: Stephen Hemminger <step...@networkplumber.org> > --- > app/test/test_link_bonding.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/app/test/test_link_bonding.c b/app/test/test_link_bonding.c > index 805613d7dd..b752a5ecbf 100644 > --- a/app/test/test_link_bonding.c > +++ b/app/test/test_link_bonding.c > @@ -792,7 +792,7 @@ test_set_primary_member(void) > &read_mac_addr), > "Failed to get mac address (port %d)", > test_params->bonding_port_id); > - TEST_ASSERT_SUCCESS(memcmp(&read_mac_addr, &read_mac_addr, > + TEST_ASSERT_SUCCESS(memcmp(expected_mac_addr, &read_mac_addr, > sizeof(read_mac_addr)), > "bonding port mac address not set to that of > primary port\n"); >
- [PATCH v3 04/10] app/test: avoid duplicate initi... Stephen Hemminger
- RE: [PATCH v3 04/10] app/test: avoid duplica... Gujjar, Abhinandan S
- [PATCH v3 09/10] app/test-pmd: avoid potential o... Stephen Hemminger
- [PATCH v4 0/9] Bug fixes for standalone tests Stephen Hemminger
- [PATCH v4 1/9] app/test: do not duplicate loop v... Stephen Hemminger
- Re: [PATCH v4 1/9] app/test: do not duplicat... fengchengwen
- [PATCH v4 4/9] app/test: avoid duplicate initial... Stephen Hemminger
- [PATCH v4 5/9] app/test: fix TLS zero length rec... Stephen Hemminger
- RE: [EXTERNAL] [PATCH v4 5/9] app/test: fix ... Anoob Joseph
- [PATCH v4 2/9] app/test: fix typo in address com... Stephen Hemminger
- Re: [PATCH v4 2/9] app/test: fix typo in add... fengchengwen
- Re: [PATCH v4 2/9] app/test: fix typo in add... Bruce Richardson
- [PATCH v4 6/9] app/test: fix operator precedence... Stephen Hemminger
- [PATCH v4 9/9] app/test-pmd: avoid potential out... Stephen Hemminger
- Re: [PATCH v4 9/9] app/test-pmd: avoid poten... fengchengwen
- [PATCH v4 8/9] app/test-pmd: remove redundant co... Stephen Hemminger
- Re: [PATCH v4 8/9] app/test-pmd: remove redu... fengchengwen
- [PATCH v4 3/9] app/test: fix paren typo Stephen Hemminger
- Re: [PATCH v4 3/9] app/test: fix paren typo fengchengwen
- [PATCH v4 7/9] test/eal: fix core check in c fla... Stephen Hemminger
- Re: [PATCH v4 7/9] test/eal: fix core check ... Aaron Conole