diff --git a/tests/other/cs-benchmark.cpp b/tests/other/cs-benchmark.cpp
index 26f5410..18c9f05 100644
--- a/tests/other/cs-benchmark.cpp
+++ b/tests/other/cs-benchmark.cpp
@@ -78,11 +78,11 @@
   void
   find(const Interest& interest)
   {
-    cs.find(interest, bind([]{}), bind([]{}));
+    cs.find(interest, [] (auto&&...) {}, [] (auto&&...) {});
   }
 
 protected:
-  typedef std::function<Name(size_t)> NameGenerator;
+  using NameGenerator = std::function<Name (size_t)>;
 
   class SimpleNameGenerator
   {
diff --git a/tests/other/face-benchmark.cpp b/tests/other/face-benchmark.cpp
index 28af8dc..1ed2143 100644
--- a/tests/other/face-benchmark.cpp
+++ b/tests/other/face-benchmark.cpp
@@ -43,14 +43,13 @@
 class FaceBenchmark
 {
 public:
+  explicit
   FaceBenchmark(const char* configFileName)
-    : m_terminationSignalSet{getGlobalIoService()}
+    : m_terminationSignalSet{getGlobalIoService(), SIGINT, SIGTERM}
     , m_tcpChannel{tcp::Endpoint{boost::asio::ip::tcp::v4(), 6363}, false,
-                   bind([] { return ndn::nfd::FACE_SCOPE_NON_LOCAL; })}
+                   [] (auto&&...) { return ndn::nfd::FACE_SCOPE_NON_LOCAL; }}
     , m_udpChannel{udp::Endpoint{boost::asio::ip::udp::v4(), 6363}, 10_min, false, ndn::MAX_NDN_PACKET_SIZE}
   {
-    m_terminationSignalSet.add(SIGINT);
-    m_terminationSignalSet.add(SIGTERM);
     m_terminationSignalSet.async_wait([] (const auto& error, int) {
       if (!error)
         getGlobalIoService().stop();
@@ -58,12 +57,12 @@
 
     parseConfig(configFileName);
 
-    m_tcpChannel.listen(bind(&FaceBenchmark::onLeftFaceCreated, this, _1),
-                        bind(&FaceBenchmark::onFaceCreationFailed, _1, _2));
+    m_tcpChannel.listen(std::bind(&FaceBenchmark::onLeftFaceCreated, this, _1),
+                        std::bind(&FaceBenchmark::onFaceCreationFailed, _1, _2));
     std::clog << "Listening on " << m_tcpChannel.getUri() << std::endl;
 
-    m_udpChannel.listen(bind(&FaceBenchmark::onLeftFaceCreated, this, _1),
-                        bind(&FaceBenchmark::onFaceCreationFailed, _1, _2));
+    m_udpChannel.listen(std::bind(&FaceBenchmark::onLeftFaceCreated, this, _1),
+                        std::bind(&FaceBenchmark::onFaceCreationFailed, _1, _2));
     std::clog << "Listening on " << m_udpChannel.getUri() << std::endl;
   }
 
@@ -86,7 +85,7 @@
         std::clog << "Unsupported protocol '" << uriR.getScheme() << "'" << std::endl;
       }
       else {
-        m_faceUris.push_back(std::make_pair(uriL, uriR));
+        m_faceUris.emplace_back(uriL, uriR);
       }
     }
 
@@ -125,13 +124,13 @@
     auto port = boost::lexical_cast<uint16_t>(uriR.getPort());
     if (uriR.getScheme() == "tcp4") {
       m_tcpChannel.connect(tcp::Endpoint(addr, port), {},
-                           bind(&FaceBenchmark::onRightFaceCreated, this, faceL, _1),
-                           bind(&FaceBenchmark::onFaceCreationFailed, _1, _2));
+                           std::bind(&FaceBenchmark::onRightFaceCreated, this, faceL, _1),
+                           std::bind(&FaceBenchmark::onFaceCreationFailed, _1, _2));
     }
     else if (uriR.getScheme() == "udp4") {
       m_udpChannel.connect(udp::Endpoint(addr, port), {},
-                           bind(&FaceBenchmark::onRightFaceCreated, this, faceL, _1),
-                           bind(&FaceBenchmark::onFaceCreationFailed, _1, _2));
+                           std::bind(&FaceBenchmark::onRightFaceCreated, this, faceL, _1),
+                           std::bind(&FaceBenchmark::onFaceCreationFailed, _1, _2));
     }
   }
 
