ci: set ASan's detect_invalid_pointer_pairs to 2
Change-Id: Ibc9a4bd447a8ccebbf864c2da6c279ef5e272739
diff --git a/tests/tools/ndn-autoconfig-server/program.t.cpp b/tests/tools/ndn-autoconfig-server/program.t.cpp
index 31731f8..88488a1 100644
--- a/tests/tools/ndn-autoconfig-server/program.t.cpp
+++ b/tests/tools/ndn-autoconfig-server/program.t.cpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2014-2019, Regents of the University of California,
+ * Copyright (c) 2014-2020, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -39,22 +39,17 @@
class AutoconfigServerFixture : public ::nfd::tests::KeyChainFixture
{
-public:
- AutoconfigServerFixture()
- : face({true, true})
- {
- }
-
+protected:
void
initialize(const Options& options)
{
program = make_unique<Program>(options, face, m_keyChain);
- face.processEvents(500_ms);
+ face.processEvents(1_s);
face.sentInterests.clear();
}
protected:
- util::DummyClientFace face;
+ util::DummyClientFace face{{true, true}};
unique_ptr<Program> program;
};
@@ -71,7 +66,7 @@
interest.setCanBePrefix(true);
interest.setMustBeFresh(true);
face.receive(interest);
- face.processEvents(500_ms);
+ face.processEvents(1_s);
BOOST_REQUIRE_EQUAL(face.sentData.size(), 1);
const Name& dataName = face.sentData[0].getName();
@@ -83,7 +78,7 @@
Interest interest2(Name(interest.getName()).appendVersion(dataName.at(-1).toVersion() - 1));
interest2.setCanBePrefix(false);
face.receive(interest2);
- face.processEvents(500_ms);
+ face.processEvents(1_s);
BOOST_CHECK_EQUAL(face.sentData.size(), 1);
}
@@ -109,12 +104,11 @@
BOOST_CHECK(dataName.at(-2).isVersion());
BOOST_CHECK(dataName.at(-1).isSegment());
});
- fetcher->onError.connect([] (uint32_t code, const std::string& msg) {
- BOOST_FAIL(msg);
- });
+ fetcher->onError.connect([] (auto, const auto& msg) { BOOST_FAIL(msg); });
+
bool isComplete = false;
- fetcher->onComplete.connect([&isComplete, nRoutablePrefixes, options] (ConstBufferPtr buffer) {
- Block payload(tlv::Content, buffer);
+ fetcher->onComplete.connect([&] (auto buffer) {
+ Block payload(tlv::Content, std::move(buffer));
payload.parse();
BOOST_REQUIRE_EQUAL(payload.elements_size(), nRoutablePrefixes);
for (size_t i = 0; i < nRoutablePrefixes; ++i) {
@@ -123,7 +117,7 @@
isComplete = true;
});
- face.processEvents(100_ms, 2000);
+ face.processEvents(1_s);
BOOST_CHECK(isComplete);
}
@@ -136,7 +130,7 @@
Interest interest("/localhop/nfd/rib/routable-prefixes");
interest.setCanBePrefix(true);
face.receive(interest);
- face.processEvents(500_ms);
+ face.processEvents(1_s);
BOOST_CHECK_EQUAL(face.sentData.size(), 0);
}