test: Lookup for struct net_if interface defined in arp test

The struct net_if object placement in linker 'net_if_area' section
now depends on the order of liked libraries (like
app/libapp.a(main.c.obj). As a result interfaces defined in testing
applications are placed first in the 'net_if_area' section.

Problem arises when board has other interfaces, which are placed on the
first (i.e. default) position. In this case the test just fails as wrong
network interface is used.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
This commit is contained in:
Lukasz Majewski 2021-04-01 10:47:45 +02:00 committed by Anas Nashif
commit a18be0cdbb

View file

@ -344,7 +344,7 @@ void test_arp(void)
net_arp_init();
iface = net_if_get_default();
iface = net_if_lookup_by_dev(DEVICE_GET(net_arp_test));
net_if_ipv4_set_gw(iface, &gw);
net_if_ipv4_set_netmask(iface, &netmask);