[bind10-dev] [svn] commit: r3548 - in /experiments/kambe-auth-stats/src/bin: auth/auth_srv.cc auth/tests/asio_link_unittest.cc bind10/bind10.py.in

JINMEI Tatuya / 神明達哉 jinmei at isc.org
Thu Nov 18 01:54:42 UTC 2010


I just happened to notice this change.

At Wed, 17 Nov 2010 10:50:36 -0000,
BIND 10 source code commits <bind10-changes at lists.isc.org> wrote:
[...]
> - fix failure in CentOS when testing unavailableAddress

> --- experiments/kambe-auth-stats/src/bin/auth/tests/asio_link_unittest.cc (original)
> +++ experiments/kambe-auth-stats/src/bin/auth/tests/asio_link_unittest.cc Wed Nov 17 10:50:35 2010
> @@ -108,7 +108,13 @@
>  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, *"255.255.0.0"), IOError);
> +    EXPECT_THROW({
> +            const char* const mcaddr_ = "255.255.0.0";
> +            IOService* io_service_ = new IOService(NULL, *TEST_PORT, *mcaddr_);
> +            delete io_service_;
> +            // if it threw nothing, explicitly throw again
> +            isc_throw(IOError, "Invalid IP address '" << mcaddr_ << "'");
> +        }, IOError);

This change effectively disables the test, just like changing this:
  EXPECT_EQ(1, thisCouldReturnZeroIfBuggy());
to this:
  EXPECT_EQ(1, 1 /* thisCouldReturnZeroIfBuggy() */);

We should instead figure out the exact reason why this test fails for
that particular platform, and then fix that problem.

And, IMO, the braced block in EXPECT_THROW look too awkward.

---
JINMEI, Tatuya



More information about the bind10-dev mailing list