From: Otto Moerbeek Date: Wed, 20 Feb 2019 08:44:04 +0000 (+0100) Subject: Init required args before calling dns_random() X-Git-Tag: dnsdist-1.4.0-alpha1~54^2~1 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=015fa236935dd3981acd9b90462feb89fe60cf95;p=pdns Init required args before calling dns_random() No clue why this only happens only on Ubuntu trusty... --- diff --git a/pdns/test-recpacketcache_cc.cc b/pdns/test-recpacketcache_cc.cc index 5caccd0d1..3c8bfe13d 100644 --- a/pdns/test-recpacketcache_cc.cc +++ b/pdns/test-recpacketcache_cc.cc @@ -5,6 +5,7 @@ #include "config.h" #endif #include +#include "arguments.hh" #include "dnswriter.hh" #include "dnsrecords.hh" #include "dns_random.hh" @@ -24,6 +25,9 @@ BOOST_AUTO_TEST_CASE(test_recPacketCacheSimple) { uint32_t ttd=3600; BOOST_CHECK_EQUAL(rpc.size(), 0); + ::arg().set("rng")="auto"; + ::arg().set("entropy-source")="/dev/urandom"; + DNSName qname("www.powerdns.com"); vector packet; DNSPacketWriter pw(packet, qname, QType::A); @@ -96,6 +100,9 @@ BOOST_AUTO_TEST_CASE(test_recPacketCache_Tags) { uint32_t ttd=3600; BOOST_CHECK_EQUAL(rpc.size(), 0); + ::arg().set("rng")="auto"; + ::arg().set("entropy-source")="/dev/urandom"; + DNSName qname("www.powerdns.com"); vector packet; DNSPacketWriter pw(packet, qname, QType::A);