tests/net: Fix ethernet mgmt mac change test
The test checked if the change was reported as successful and it always was. What needs to be done is comparing whether the mac address was actually changed to the requested one. This commit adds this check. Signed-off-by: Tomasz Gorochowik <tgorochowik@antmicro.com>
This commit is contained in:
parent
05148610a4
commit
e2db76c9cc
@ -163,6 +163,11 @@ static void test_change_mac_when_down(void)
|
||||
ret = net_mgmt(NET_REQUEST_ETHERNET_SET_MAC_ADDRESS, iface,
|
||||
¶ms, sizeof(struct ethernet_req_params));
|
||||
|
||||
zassert_equal(ret, 0, "unable to change mac address\n");
|
||||
|
||||
ret = memcmp(net_if_get_link_addr(iface)->addr, mac_addr_change,
|
||||
sizeof(mac_addr_change));
|
||||
|
||||
zassert_equal(ret, 0, "invalid mac address change\n");
|
||||
|
||||
net_if_up(iface);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user