From: Remi Gacogne Date: Mon, 17 Jun 2019 12:27:32 +0000 (+0200) Subject: Add debug informations to the MPlexer unit tests, tracking a failure X-Git-Tag: dnsdist-1.4.0-rc1~118^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9f79f5d1fb108c8afaeac05961c0983694a415b9;p=thirdparty%2Fpdns.git Add debug informations to the MPlexer unit tests, tracking a failure --- diff --git a/pdns/test-mplexer.cc b/pdns/test-mplexer.cc index 8a7412fea6..f2ac639afc 100644 --- a/pdns/test-mplexer.cc +++ b/pdns/test-mplexer.cc @@ -90,9 +90,9 @@ BOOST_AUTO_TEST_CASE(test_MPlexer) { *calledPtr = true; }; mplexer->addReadFD(pipes[0], - readCB, - &readCBCalled, - &ttd); + readCB, + &readCBCalled, + &ttd); /* not ready for reading yet */ readyFDs.clear(); @@ -124,6 +124,25 @@ BOOST_AUTO_TEST_CASE(test_MPlexer) { /* both should be available */ readyFDs.clear(); mplexer->getAvailableFDs(readyFDs, 0); + if (readyFDs.size() == 1) { + /* something is wrong, we need some debug infos */ + cerr<<"FDMultiPlexer implementation is "<getName()<getWatchedFDCount(false)<<" FDs for read and "<getWatchedFDCount(true)<<" for write"<