]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
test/crimson: add delay when stopping seastar
authorYingxin Cheng <yingxin.cheng@intel.com>
Sun, 19 Jan 2020 07:54:48 +0000 (15:54 +0800)
committerYingxin Cheng <yingxin.cheng@intel.com>
Wed, 12 Feb 2020 02:47:47 +0000 (10:47 +0800)
Seastar has bugs to have events undispatched during shutdown, which will
result in memory leak and thus fail LeakSanitizer.

Notably, there is a chance to lose the the destruction task of
foreign_ptr<lw_shared_ptr<conntrack::load_balancer>> submitted by
conntrack::~handle(). See
https://github.com/scylladb/seastar/blob/96ccbbe5262bed6d50a2392f6a77e84a490503b2/include/seastar/net/posix-stack.hh#L86-L89

Signed-off-by: Yingxin Cheng <yingxin.cheng@intel.com>
src/test/crimson/test_messenger.cc
src/test/crimson/test_socket.cc

index 83bd2a051d09707339ac8ad213a8f35b7cd33bf9..322c4f4b5fddb5270df88faf3e60fb03ecdece20 100644 (file)
@@ -3715,6 +3715,9 @@ int main(int argc, char** argv)
       return test_v2_protocol(v2_test_addr, v2_testpeer_addr, v2_testpeer_islocal);
     }).then([] {
       std::cout << "All tests succeeded" << std::endl;
+      // Seastar has bugs to have events undispatched during shutdown,
+      // which will result in memory leak and thus fail LeakSanitizer.
+      return seastar::sleep(100ms);
     }).handle_exception([] (auto eptr) {
       std::cout << "Test failure" << std::endl;
       return seastar::make_exception_future<>(eptr);
index 29dd2cdb37bc817aee002544f6b89e5fde7f90ec..fc2e7ac20b6d51d25483a82302c3800b315e2446 100644 (file)
@@ -434,6 +434,9 @@ int main(int argc, char** argv)
       return test_preemptive_down();
     }).then([] {
       logger.info("All tests succeeded");
+      // Seastar has bugs to have events undispatched during shutdown,
+      // which will result in memory leak and thus fail LeakSanitizer.
+      return seastar::sleep(100ms);
     }).handle_exception([] (auto eptr) {
       std::cout << "Test failure" << std::endl;
       return seastar::make_exception_future<>(eptr);