- cd pdns
- make -k -j 4 pdns_recursor
- rm -f pdns_recursor
+ - ./pdnssec test-algorithms
- cd ..
- ./build-scripts/dist-recursor
- cd pdns/pdns-recursor-*/
getMakers()[algo]=maker;
}
-void DNSCryptoKeyEngine::testAll()
+bool DNSCryptoKeyEngine::testAll()
{
+ bool ret=true;
+
BOOST_FOREACH(const allmakers_t::value_type& value, getAllMakers())
{
BOOST_FOREACH(maker_t* creator, value.second) {
catch(std::exception& e)
{
cerr<<e.what()<<endl;
+ ret=false;
}
}
}
}
}
+ return ret;
}
-void DNSCryptoKeyEngine::testOne(int algo)
+bool DNSCryptoKeyEngine::testOne(int algo)
{
+ bool ret=true;
+
BOOST_FOREACH(maker_t* creator, getAllMakers()[algo]) {
BOOST_FOREACH(maker_t* signer, getAllMakers()[algo]) {
catch(std::exception& e)
{
cerr<<e.what()<<endl;
+ ret=false;
}
}
}
}
+ return ret;
}
// returns times it took to sign and verify
pair<unsigned int, unsigned int> DNSCryptoKeyEngine::testMakers(unsigned int algo, maker_t* creator, maker_t* signer, maker_t* verifier)
static void report(unsigned int algorithm, maker_t* maker, bool fallback=false);
static std::pair<unsigned int, unsigned int> testMakers(unsigned int algorithm, maker_t* creator, maker_t* signer, maker_t* verifier);
- static void testAll();
- static void testOne(int algo);
+ static bool testAll();
+ static bool testOne(int algo);
private:
typedef std::map<unsigned int, maker_t*> makers_t;
return 0;
}
-void testAlgorithm(int algo)
+bool testAlgorithm(int algo)
{
- DNSCryptoKeyEngine::testOne(algo);
+ return DNSCryptoKeyEngine::testOne(algo);
}
-void testAlgorithms()
+bool testAlgorithms()
{
- DNSCryptoKeyEngine::testAll();
+ return DNSCryptoKeyEngine::testAll();
}
void testSpeed(DNSSECKeeper& dk, const string& zone, const string& remote, int cores)
cerr << "Syntax: pdnssec test-algorithm algonum"<<endl;
return 0;
}
- testAlgorithm(lexical_cast<int>(cmds[1]));
- return 0;
+ if (testAlgorithm(lexical_cast<int>(cmds[1])))
+ return 0;
+ return 1;
}
if(cmds[0] == "test-algorithms") {
- testAlgorithms();
- return 0;
+ if (testAlgorithms())
+ return 0;
+ return 1;
}
loadMainConfig(g_vm["config-dir"].as<string>());