tst_QUdpSocket: stop trying to bind to multicast addresses

This is not an official feature of the networking stacks and does not
work portably across operating systems. So just stop trying to do that.

This was failing reliably (not flaky!) with IPv6 on FreeBSD and
Windows. For IPv4, Windows apparently accepts 239.255.0.0/16 but not
other addresses, so remove IPv4 too.

Change-Id: Ifb5969bf206e4cd7b14efffd14fb682c2839e95d
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
This commit is contained in:
Thiago Macieira 2017-11-28 16:49:40 -08:00
parent b12db22fcf
commit bbcd453388
2 changed files with 0 additions and 4 deletions

View File

@ -1,5 +1,3 @@
[multicast:same bind, group ipv6 address]
*
[multicast]
osx
[writeDatagramToNonExistingPeer]

View File

@ -1353,10 +1353,8 @@ void tst_QUdpSocket::multicast_data()
QTest::addColumn<bool>("joinResult");
QTest::newRow("valid bind, group ipv4 address") << anyAddress << true << groupAddress << true;
QTest::newRow("valid bind, invalid group ipv4 address") << anyAddress << true << anyAddress << false;
QTest::newRow("same bind, group ipv4 address") << groupAddress << true << groupAddress << true;
QTest::newRow("valid bind, group ipv6 address") << any6Address << true << group6Address << true;
QTest::newRow("valid bind, invalid group ipv6 address") << any6Address << true << any6Address << false;
QTest::newRow("same bind, group ipv6 address") << group6Address << false << group6Address << false;
QTest::newRow("dual bind, group ipv4 address") << dualAddress << true << groupAddress << false;
QTest::newRow("dual bind, group ipv6 address") << dualAddress << true << group6Address << true;
}