[libvirt] libvirt-tck test failure after commit b3d06987

Jim Fehlig jfehlig at suse.com
Thu Jun 2 05:13:18 UTC 2016


We've noticed libvirt-tck test 100-apply-verify-host.t failing recently on
libvirt.git master and I finally got around to bisecting it to commit b3d06987.
I haven't looked at the test in detail, but it appears to expect a broadcast
address of 10.1.2.255, however finds an address of 0.0.0.0 after commit
b3d06987. I'm not terribly familiar with this code, but the following hunk of
b3d06987 looks suspect

@@ -1039,21 +1039,28 @@ virNetDevCreateNetlinkAddressMessage(int messageType,
                                      const char *ifname,
                                      virSocketAddr *addr,
                                      unsigned int prefix,
-                                     virSocketAddr *broadcast)
+                                     virSocketAddr *broadcast,
+                                     virSocketAddr *peer)
 {
     struct nl_msg *nlmsg = NULL;
     struct ifaddrmsg ifa;
     unsigned int ifindex;
     void *addrData = NULL;
+    void *peerData = NULL;
     void *broadcastData = NULL;
     size_t addrDataLen;
 
     if (virNetDevGetIPAddressBinary(addr, &addrData, &addrDataLen) < 0)
         return NULL;
 
-    if (broadcast && virNetDevGetIPAddressBinary(broadcast, &broadcastData,
-                                                 &addrDataLen) < 0)
-        return NULL;
+    if (peer && VIR_SOCKET_ADDR_VALID(peer)) {
+        if (virNetDevGetIPAddressBinary(peer, &peerData, &addrDataLen) < 0)
+            return NULL;
+    } else if (broadcast) {
+        if (virNetDevGetIPAddressBinary(broadcast, &broadcastData,
+                                        &addrDataLen) < 0)
+            return NULL;
+    }
 
     /* Get the interface index */
     if ((ifindex = if_nametoindex(ifname)) == 0)

Vasiliy, I can look in more detail tomorrow, but in the meantime any suggestions
you have would be much appreciated.

Regards,
Jim





More information about the libvir-list mailing list