From: Yingxin Cheng Date: Mon, 26 Feb 2024 06:17:48 +0000 (+0800) Subject: test/crimson/test_socket: complete write-side errors in test_unexpected_down() X-Git-Tag: v20.0.0~2539^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F55751%2Fhead;p=ceph.git test/crimson/test_socket: complete write-side errors in test_unexpected_down() Related: https://tracker.ceph.com/issues/64457 Signed-off-by: Yingxin Cheng --- diff --git a/src/test/crimson/test_socket.cc b/src/test/crimson/test_socket.cc index 8a13fb77ec7f..99c8aee84f77 100644 --- a/src/test/crimson/test_socket.cc +++ b/src/test/crimson/test_socket.cc @@ -451,8 +451,11 @@ future<> test_unexpected_down(bool is_fixed_cpu) { return Connection::dispatch_rw_bounded(cs, 128, true ).handle_exception_type([](const std::system_error& e) { logger().error("test_unexpected_down(): client get error {}", e); + // union of errors from both read and write + // also see dispatch_write_unbounded() and dispatch_read_unbounded() ceph_assert(e.code() == error::read_eof || - e.code() == std::errc::connection_reset); + e.code() == std::errc::connection_reset || + e.code() == std::errc::broken_pipe); }); }, [](auto ss) { return Connection::dispatch_rw_unbounded(ss); }