[dpdk-dev] test: fix wrong assignment operation

Message ID 20170915023557.35681-1-zhiyong.yang@intel.com (mailing list archive)
State Accepted, archived
Delegated to: Ferruh Yigit
Headers

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation success Compilation OK

Commit Message

Yang, Zhiyong Sept. 15, 2017, 2:35 a.m. UTC
  It should be an comparation operation rather than an assignment
operation.

Fixes: 5e41ab250dfa("app/test: unit tests for bonding mode 4")

Signed-off-by: Zhiyong Yang <zhiyong.yang@intel.com>
---
 test/test/test_link_bonding_mode4.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Comments

Ferruh Yigit Sept. 18, 2017, 7:25 p.m. UTC | #1
On 9/15/2017 3:35 AM, Zhiyong Yang wrote:
> It should be an comparation operation rather than an assignment
> operation.
> 
> Fixes: 5e41ab250dfa("app/test: unit tests for bonding mode 4")
> 
> Signed-off-by: Zhiyong Yang <zhiyong.yang@intel.com>

Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
  
Ferruh Yigit Sept. 18, 2017, 7:27 p.m. UTC | #2
On 9/18/2017 8:25 PM, Ferruh Yigit wrote:
> On 9/15/2017 3:35 AM, Zhiyong Yang wrote:
>> It should be an comparation operation rather than an assignment
>> operation.
>>
>> Fixes: 5e41ab250dfa("app/test: unit tests for bonding mode 4")
>>
>> Signed-off-by: Zhiyong Yang <zhiyong.yang@intel.com>
> 
> Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>

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

Patch

diff --git a/test/test/test_link_bonding_mode4.c b/test/test/test_link_bonding_mode4.c
index 8e9e23db5..e246f0148 100644
--- a/test/test/test_link_bonding_mode4.c
+++ b/test/test/test_link_bonding_mode4.c
@@ -661,7 +661,7 @@  bond_handshake(void)
 	TEST_ASSERT_EQUAL(all_slaves_done, 1, "Bond handshake failed\n");
 
 	/* If flags doesn't match - report failure */
-	return all_slaves_done = 1 ? TEST_SUCCESS : TEST_FAILED;
+	return all_slaves_done == 1 ? TEST_SUCCESS : TEST_FAILED;
 }
 
 #define TEST_LACP_SLAVE_COUT RTE_DIM(test_params.slave_ports)