[libvirt] libvirt-tck test failure after commit b3d06987

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

2016-06-02 8:13 GMT+03:00 Jim Fehlig <jfehlig@suse.com>:
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
Can you share me path where i can find this test? -- Vasiliy Tolstov, e-mail: v.tolstov@yoctocloud.net

On 06/02/2016 05:29 AM, Vasiliy Tolstov wrote:
2016-06-02 8:13 GMT+03:00 Jim Fehlig <jfehlig@suse.com>:
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
Can you share me path where i can find this test?
The tck is in git (git://libvirt.org/libvirt-tck.git). Regards, Jim

Hi Vasiliy, On Thursday, June 02, 2016 02:29:51 PM Vasiliy Tolstov wrote:
2016-06-02 8:13 GMT+03:00 Jim Fehlig <jfehlig@suse.com>:
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
Can you share me path where i can find this test?
Before you spend too much time figuring out that test, the problem can be seen outside the TCK framework by manually creating the network the test uses: <network> <name>tck-testnet</name> <uuid>aadc8920-502a-4774-ac2b-cd382a204d06</uuid> <forward mode='nat'/> <bridge name='tck-testbr' stp='on' delay='0' /> <ip address='10.1.2.1' netmask='255.255.255.0'> <dhcp> <range start='10.1.2.2' end='10.1.2.254' /> </dhcp> </ip> </network> After creating the network, the TCK test verifies the network was setup properly by checking the output of iptables, ip, etc... One of these tests checks the network address and broadcast address for the bridge. The expected values are 10.1.2.1/24 (IP address) and 10.1.2.255 (broadcast address). Under the current libvirt code, the broadcast address is not set, so the test fails to parse the output of `ip -o a` correctly, and the test fails. Checking the network setup manually shows the missing broadcast address: # ip a show tck-testbr 82: tck-testbr: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN group default qlen 1000 link/ether 52:54:00:ec:41:9e brd ff:ff:ff:ff:ff:ff inet 10.1.2.1/24 scope global tck-testbr valid_lft forever preferred_lft forever If there were a broadcast address, the inet line above should look like: inet 10.1.2.1/24 brd 10.1.2.255 scope global tck-testbr ifconfig shows the broadcast address as 0.0.0.0: #ifconfig tck-testb Link encap:Ethernet HWaddr 52:54:00:EC:41:9E inet addr:10.1.2.1 Bcast:0.0.0.0 Mask:255.255.255.0 UP BROADCAST MULTICAST MTU:1500 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:0 (0.0 b) TX bytes:0 (0.0 b) I haven't pulled any LAN traces yet, but the missing/0.0.0.0 broadcast address does not seem correct. -Mike
participants (3)
-
Jim Fehlig
-
Mike Latimer
-
Vasiliy Tolstov