From 015fa236935dd3981acd9b90462feb89fe60cf95 Mon Sep 17 00:00:00 2001 From: Otto Moerbeek Date: Wed, 20 Feb 2019 09:44:04 +0100 Subject: [PATCH] Init required args before calling dns_random() No clue why this only happens only on Ubuntu trusty... --- pdns/test-recpacketcache_cc.cc | 7 +++++++ 1 file changed, 7 insertions(+) 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); -- 2.40.0