Closed youngifif closed 1 month ago
Integration tests look to be constantly failing now.
Integration tests look to be constantly failing now.
I think the testCase in TestConfigureInterface is not correct.
I use Debian12 official iproute2 tools to input command as follow:
sudo ip addr add 10.20.30.40 dev eth0
sudo ip addr add 10.20.30.40 dev eth0
then i got:
RTNETLINK answers: File exists
apparently netlink doesn't allow add the same address to one dev multiple times.
Inside TestConfigureInterface(), the func ConfigureInterface(ifname string, netconf *NetConf)
calls rt.AddrAdd(iface, &addr.IPNet)
with same addr and same iface. So, the last call expects
a error of 'file exits'.
I was misleading by cerr
, the original one is correct.
I gonna issue a new issue PR about test case
In ConfigureInterface(),the defer closure misuse outter 'err' to check nil ,not 'cerr' inside the closure.