]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
test/crimson: log intercepted breakpoint with counter
authorYingxin Cheng <yingxin.cheng@intel.com>
Fri, 6 Sep 2019 02:32:24 +0000 (10:32 +0800)
committerYingxin Cheng <yingxin.cheng@intel.com>
Wed, 18 Sep 2019 04:24:05 +0000 (12:24 +0800)
Signed-off-by: Yingxin Cheng <yingxin.cheng@intel.com>
src/test/crimson/test_messenger.cc

index 0f5fc24b4764e4d1d3b588abd814b37ca022d569..158cd13ed74d3d95a25bed6757ae487adbbdafe2 100644 (file)
@@ -814,11 +814,10 @@ struct TestInterceptor : public Interceptor {
 
     auto result = find_result(conn.shared_from_this());
     if (result == nullptr) {
-      logger().error("Untracked intercepted connection: {}, at breakpoint {}",
-                     conn, bp);
+      logger().error("Untracked intercepted connection: {}, at breakpoint {}({})",
+                     conn, bp, breakpoints_counter[bp].counter);
       ceph_abort();
     }
-    logger().info("[{}] {} intercepted {}", result->index, conn, bp);
 
     if (bp == custom_bp_t::SOCKET_CONNECTING) {
       ++result->connect_attempts;
@@ -838,9 +837,14 @@ struct TestInterceptor : public Interceptor {
     if (it_bp != breakpoints.end()) {
       auto it_cnt = it_bp->second.find(breakpoints_counter[bp].counter);
       if (it_cnt != it_bp->second.end()) {
+        logger().info("[{}] {} intercepted {}({}) => {}",
+                      result->index, conn, bp,
+                      breakpoints_counter[bp].counter, it_cnt->second);
         return true;
       }
     }
+    logger().info("[{}] {} intercepted {}({})",
+                  result->index, conn, bp, breakpoints_counter[bp].counter);
     return false;
   }
 };