Autotest: remove the check that broadcast = ip | ~netmask
It's possible to configure an interface so that it isn't the case. I have no idea if this is a valid scenario, but the unit test shouldn't enforce that. ip addr can report: inet 192.168.1.1/32 brd 192.168.1.255 scope global vlan0 valid_lft forever preferred_lft forever Change-Id: I8de47ed6c7be4847b99bffff141c337575760bd9 Reviewed-by: Richard J. Moore <rich@kde.org>
This commit is contained in:
parent
8cd67bbfac
commit
dcc36d7aa3
@ -232,13 +232,6 @@ void tst_QNetworkInterface::interfaceFromXXX()
|
||||
// but only for IPv4 (there is no such thing as broadcast in IPv6)
|
||||
if (entry.ip().protocol() == QAbstractSocket::IPv4Protocol) {
|
||||
QVERIFY(!entry.broadcast().isNull());
|
||||
|
||||
// verify that the broadcast address is correct
|
||||
quint32 ip = entry.ip().toIPv4Address();
|
||||
quint32 mask = entry.netmask().toIPv4Address();
|
||||
quint32 bcast = entry.broadcast().toIPv4Address();
|
||||
|
||||
QCOMPARE(bcast, ip | ~mask);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user