Prevent test failures when there are non Ethernet devices on the system.
authorThadeu Lima de Souza Cascardo <cascardo@redhat.com>
Wed, 18 Nov 2015 18:38:28 +0000 (16:38 -0200)
committerBen Pfaff <blp@ovn.org>
Mon, 23 Nov 2015 18:18:28 +0000 (10:18 -0800)
When there are PtP TUN devices on the system or SIT devices, tests will fail
because of a warning that it was not possible to get their Ethernet addresses.
That call comes from the route code adding tunnel ports.

Make that warning an informational message and filter that out during tests.

Also, return EINVAL when trying to get those interface Ethernet addresses, which
will prevent them from being added to the tunnel ports pool and will properly
fail in other places as well.

Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@redhat.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
lib/netdev-linux.c
tests/ofproto-macros.at

index 584e804..e047be5 100644 (file)
@@ -5516,8 +5516,9 @@ get_etheraddr(const char *netdev_name, struct eth_addr *ea)
     }
     hwaddr_family = ifr.ifr_hwaddr.sa_family;
     if (hwaddr_family != AF_UNSPEC && hwaddr_family != ARPHRD_ETHER) {
-        VLOG_WARN("%s device has unknown hardware address family %d",
+        VLOG_INFO("%s device has unknown hardware address family %d",
                   netdev_name, hwaddr_family);
+        return EINVAL;
     }
     memcpy(ea, ifr.ifr_hwaddr.sa_data, ETH_ADDR_LEN);
     return 0;
index fcd36fb..e808258 100644 (file)
@@ -268,6 +268,7 @@ m4_define([_OVS_VSWITCHD_START],
 /vswitchd|INFO|ovs-vswitchd (Open vSwitch)/d
 /reconnect|INFO|/d
 /ofproto|INFO|using datapath ID/d
+/netdev_linux|INFO|.*device has unknown hardware address family/d
 /ofproto|INFO|datapath ID changed to fedcba9876543210/d']])
 ])