Sanity 224c test always passes because no fault injection happened.
This Patch adds additional step in fault injection and fix this test.
Test-Parameters: clientarch=aarch64 testlist=node-provisioning-1,lustre-initialization-1,lnet-selftest,sanity
Signed-off-by: Artem Blagodarenko <artem.blagodarenko@seagate.com>
Xyratex-bug-id: MRP-2472
Change-Id: I5f637e98b46ddda6acbafb956f9b85fccb7cae15
Reviewed-on: https://review.whamcloud.com/16426
Reviewed-by: Alexander Zarochentsev <c17826@cray.com>
Tested-by: Jenkins
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Mike Pershin <mpershin@whamcloud.com>
CFS_FAIL_LOC_VALUE = 3
};
+/* Failure ranges
+ "0x0100 - 0x3fff" for Lustre
+ "0xe000 - 0xefff" for LNet
+ "0xf000 - 0xffff" for LNDs */
/* Failure injection control */
#define CFS_FAIL_MASK_SYS 0x0000FF00
#define CFS_FAIL_MASK_LOC (0x000000FF | CFS_FAIL_MASK_SYS)
#ifndef __LNET_LIB_LNET_H__
#define __LNET_LIB_LNET_H__
+/* LNET has 0xeXXX */
+#define CFS_FAIL_PTLRPC_OST_BULK_CB2 0xe000
+
#ifndef __KERNEL__
# error This include is only for kernel use.
#endif
if (ack == LNET_ACK_REQ)
lnet_attach_rsp_tracker(rspt, cpt, md, mdh);
- rc = lnet_send(self, msg, LNET_NID_ANY);
+ if (CFS_FAIL_CHECK_ORSET(CFS_FAIL_PTLRPC_OST_BULK_CB2,
+ CFS_FAIL_ONCE))
+ rc = -EIO;
+ else
+ rc = lnet_send(self, msg, LNET_NID_ANY);
+
if (rc != 0) {
CNETERR("Error sending PUT to %s: %d\n",
libcfs_id2str(target), rc);
#define OBD_FAIL_OSD_FAIL_AT_TRUNCATE 0x2301
+/* LNet is allocated failure locations 0xe000 to 0xffff */
/* Assign references to moved code to reduce code changes */
#define OBD_FAIL_PRECHECK(id) CFS_FAIL_PRECHECK(id)
#define OBD_FAIL_CHECK(id) CFS_FAIL_CHECK(id)
#include <obd.h>
#include <obd_class.h>
#include "ptlrpc_internal.h"
+#include <lnet/lib-lnet.h> /* for CFS_FAIL_PTLRPC_OST_BULK_CB2 */
/**
* Helper function. Sends \a len bytes from \a base at offset \a offset
break;
}
- /* LU-6441: last md is not sent and desc->bd_md_count == 1 */
- if (OBD_FAIL_CHECK_ORSET(OBD_FAIL_PTLRPC_CLIENT_BULK_CB3,
- CFS_FAIL_ONCE) &&
- total_md > 1 && posted_md == total_md - 1) {
- posted_md++;
- continue;
- }
+ /* sanity.sh 224c: lets skip last md */
+ if (posted_md == desc->bd_md_max_brw - 1)
+ OBD_FAIL_CHECK_RESET(OBD_FAIL_PTLRPC_CLIENT_BULK_CB3,
+ CFS_FAIL_PTLRPC_OST_BULK_CB2);
/* Network is about to get at the memory */
if (ptlrpc_is_bulk_put_source(desc->bd_type))
set_persistent_param_and_check client "$test_at" "$param_at" 0
set_persistent_param_and_check client "$test_timeout" "$param_timeout" 5
- #define OBD_FAIL_PTLRPC_CLIENT_BULK_CB3 0x520
- do_facet ost1 $LCTL set_param fail_loc=0x520
+ #define OBD_FAIL_PTLRPC_CLIENT_BULK_CB3 0x520
+ do_facet ost1 "$LCTL set_param fail_loc=0x520"
$LFS setstripe -c 1 -i 0 $DIR/$tfile
dd if=/dev/zero of=$DIR/$tfile bs=8MB count=1
sync
- do_facet ost1 $LCTL set_param fail_loc=0
+ do_facet ost1 "$LCTL set_param fail_loc=0"
set_persistent_param_and_check client "$test_at" "$param_at" $at_max
set_persistent_param_and_check client "$test_timeout" "$param_timeout" \