From: Otto Moerbeek Date: Wed, 30 Sep 2020 12:11:38 +0000 (+0200) Subject: Switch off IPv4 for this test to make sure there's only one IP per NS. X-Git-Tag: auth-4.4.0-alpha2~45^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=refs%2Fpull%2F9566%2Fhead;p=thirdparty%2Fpdns.git Switch off IPv4 for this test to make sure there's only one IP per NS. This avoids the non-deterministic behaviour. --- diff --git a/pdns/recursordist/test-syncres_cc2.cc b/pdns/recursordist/test-syncres_cc2.cc index c7f40b44cb..d34766041f 100644 --- a/pdns/recursordist/test-syncres_cc2.cc +++ b/pdns/recursordist/test-syncres_cc2.cc @@ -101,6 +101,12 @@ BOOST_AUTO_TEST_CASE(test_glueless_referral_loop) std::unique_ptr sr; initSR(sr); + // We only do v4, this avoids "beenthere" non-deterministic behavour. If we do both v4 and v6, there are multiple IPs + // per (root) nameserver, and the "beenthere" loop detection is influenced by the particular address family selected. + // To see the non-deterministic behaviour, uncomment the line below (you'll be seeing around 21-24 queries). + // See #9565 + SyncRes::s_doIPv6 = false; + primeHints(); const DNSName target1("powerdns.com."); @@ -153,9 +159,7 @@ BOOST_AUTO_TEST_CASE(test_glueless_referral_loop) int res = sr->beginResolve(target1, QType(QType::A), QClass::IN, ret); BOOST_CHECK_EQUAL(res, RCode::ServFail); BOOST_REQUIRE_EQUAL(ret.size(), 0U); - // Due to some non-deterministic behaviour in the recursor, this number varies. - // Investigate! See #9565 - //BOOST_CHECK_EQUAL(queriesToNS, 22U); + BOOST_CHECK_EQUAL(queriesToNS, 16U); } BOOST_AUTO_TEST_CASE(test_cname_qperq)