From 0aa75175d18a82644ca7af348573788a25b25da8 Mon Sep 17 00:00:00 2001 From: Otto Moerbeek Date: Fri, 25 Oct 2024 14:49:04 +0200 Subject: [PATCH] rec: make valgrind build and testrunner run work again The testrunner run becomes very slow, a non-zero inception skew is needed. --- pdns/recursordist/mtasker.hh | 3 +-- pdns/recursordist/test-rec-tcounters_cc.cc | 1 + pdns/recursordist/test-syncres_cc.cc | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/pdns/recursordist/mtasker.hh b/pdns/recursordist/mtasker.hh index a45f64d832..f51ede3b33 100644 --- a/pdns/recursordist/mtasker.hh +++ b/pdns/recursordist/mtasker.hh @@ -373,8 +373,7 @@ std::shared_ptr MTasker::getUContext() ucontext->uc_link = &d_kernel; // come back to kernel after dying #ifdef PDNS_USE_VALGRIND - uc->valgrind_id = VALGRIND_STACK_REGISTER(&uc->uc_stack[0], - &uc->uc_stack[uc->uc_stack.size() - 1]); + ucontext->valgrind_id = VALGRIND_STACK_REGISTER(&ucontext->uc_stack[0], &ucontext->uc_stack[ucontext->uc_stack.size() - 1]); #endif /* PDNS_USE_VALGRIND */ return ucontext; diff --git a/pdns/recursordist/test-rec-tcounters_cc.cc b/pdns/recursordist/test-rec-tcounters_cc.cc index 82faf53430..f77d5b297c 100644 --- a/pdns/recursordist/test-rec-tcounters_cc.cc +++ b/pdns/recursordist/test-rec-tcounters_cc.cc @@ -76,6 +76,7 @@ BOOST_AUTO_TEST_CASE(update_fast) BOOST_CHECK_EQUAL(counts.uint64Count[0], counts.uint64Count[1]); auto avg = counts.at(rec::DoubleWAvgCounter::avgLatencyUsec).avg; BOOST_CHECK(avg == 0.0 || (avg >= 1.1 && avg <= 2.2)); + std::this_thread::yield(); // needed, as otherwise the updates to done might not be spotted under valgrind } }); thread1.join(); diff --git a/pdns/recursordist/test-syncres_cc.cc b/pdns/recursordist/test-syncres_cc.cc index 94d3ff6e43..49d593503d 100644 --- a/pdns/recursordist/test-syncres_cc.cc +++ b/pdns/recursordist/test-syncres_cc.cc @@ -215,6 +215,7 @@ void initSR(bool debug) g_dnssecmode = DNSSECMode::Off; g_maxNSEC3Iterations = 2500; + g_signatureInceptionSkew = 60; g_aggressiveNSECCache.reset(); AggressiveNSECCache::s_maxNSEC3CommonPrefix = AggressiveNSECCache::s_default_maxNSEC3CommonPrefix; -- 2.47.2