Whamcloud - gitweb
LU-4181 lnet_selftest: bogus lst errors 79/13279/3
authorIsaac Huang <he.huang@intel.com>
Wed, 7 Jan 2015 22:05:39 +0000 (15:05 -0700)
committerOleg Drokin <oleg.drokin@intel.com>
Fri, 16 Jan 2015 03:25:55 +0000 (03:25 +0000)
It should not be counted as errors if a test RPC
has been stopped due to administrative actions,
e.g. lst end_session from the remote test console.

Change-Id: Ia35f5e357ce6bf7ad57efb3652ebb27c772ac611
Signed-off-by: Isaac Huang <he.huang@intel.com>
Reviewed-on: http://review.whamcloud.com/13279
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Amir Shehata <amir.shehata@intel.com>
Reviewed-by: Liang Zhen <liang.zhen@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
lnet/selftest/rpc.c

index 4119bde..2845bf6 100644 (file)
@@ -1458,17 +1458,16 @@ srpc_lnet_ev_handler(lnet_event_t *ev)
        LASSERT (!in_interrupt());
 
        if (ev->status != 0) {
        LASSERT (!in_interrupt());
 
        if (ev->status != 0) {
+               __u32 errors;
+
                spin_lock(&srpc_data.rpc_glock);
                spin_lock(&srpc_data.rpc_glock);
-               srpc_data.rpc_counters.errors++;
-               CERROR("ev->status = %d, ev->type = %d, errors = %u, "
-                      "rpcs_sent = %u, rpcs_rcvd = %u, rpcs_dropped = %u, "
-                      "rpcs_expired = %u\n",
-                      ev->status, ev->type, srpc_data.rpc_counters.errors,
-                      srpc_data.rpc_counters.rpcs_sent,
-                      srpc_data.rpc_counters.rpcs_rcvd,
-                      srpc_data.rpc_counters.rpcs_dropped,
-                      srpc_data.rpc_counters.rpcs_expired);
+               if (ev->status != -ECANCELED) /* cancellation is not error */
+                       srpc_data.rpc_counters.errors++;
+               errors = srpc_data.rpc_counters.errors;
                spin_unlock(&srpc_data.rpc_glock);
                spin_unlock(&srpc_data.rpc_glock);
+
+               CNETERR("LNet event status %d type %d, RPC errors %u\n",
+                       ev->status, ev->type, errors);
        }
 
         rpcev->ev_lnet = ev->type;
        }
 
         rpcev->ev_lnet = ev->type;