]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
test/crimson/test_socket: complete write-side errors in test_unexpected_down()
authorYingxin Cheng <yingxin.cheng@intel.com>
Mon, 26 Feb 2024 06:17:48 +0000 (14:17 +0800)
committerMatan Breizman <mbreizma@redhat.com>
Mon, 6 May 2024 12:45:05 +0000 (15:45 +0300)
Related: https://tracker.ceph.com/issues/64457
Signed-off-by: Yingxin Cheng <yingxin.cheng@intel.com>
(cherry picked from commit 5b03e4d3d73466c34e57f094e5ce2e51af56bd78)

src/test/crimson/test_socket.cc

index aad91d46a82ca6014b683e3326c99c86b367b393..ac35dbf0738343b17d28093731d7f6d3ba3a0e7c 100644 (file)
@@ -450,8 +450,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); }