[svn] commit: r2656 - /trunk/src/bin/auth/tests/asio_link_unittest.cc
BIND 10 source code commits
bind10-changes at lists.isc.org
Fri Aug 6 19:45:42 UTC 2010
Author: jinmei
Date: Fri Aug 6 19:45:42 2010
New Revision: 2656
Log:
avoid using a multicast IPv6 address for IOServiceTest.unavailableAddress
as NetBSD allows a TCP socket to be bound to it. this behavior is
questionable, but even if it's an OS bug it's better to keep our tests as
portable as possible especially if it can be done by a trivial parameter
change.
fix is quite trivial, okayed in jabber, skipping formal review.
Modified:
trunk/src/bin/auth/tests/asio_link_unittest.cc
Modified: trunk/src/bin/auth/tests/asio_link_unittest.cc
==============================================================================
--- trunk/src/bin/auth/tests/asio_link_unittest.cc (original)
+++ trunk/src/bin/auth/tests/asio_link_unittest.cc Fri Aug 6 19:45:42 2010
@@ -108,8 +108,14 @@
TEST(IOServiceTest, unavailableAddress) {
// These addresses should generally be unavailable as a valid local
// address, although there's no guarantee in theory.
- EXPECT_THROW(IOService(NULL, *TEST_PORT, *"ffff:ffff::"), IOError);
EXPECT_THROW(IOService(NULL, *TEST_PORT, *"255.255.0.0"), IOError);
+
+ // Some OSes would simply reject binding attempt for an AF_INET6 socket
+ // to an IPv4-mapped IPv6 address. Even if those that allow it, since
+ // the corresponding IPv4 address is the same as the one used in the
+ // AF_INET socket case above, it should at least show the same result
+ // as the previous one.
+ EXPECT_THROW(IOService(NULL, *TEST_PORT, *"::ffff:255.255.0.0"), IOError);
}
TEST(IOServiceTest, duplicateBind) {
More information about the bind10-changes
mailing list