Add ability to use failure injection to specify a message type for
simulated failure.
For example, to simulate failure of all immediate messages:
lctl set_param fail_loc=0xF114 fail_val=1
To simulate failure of a single hello request:
lctl set_param fail_loc=0x8000F114 fail_val=4
HPE-bug-id: LUS-11128
Test-Parameters: trivial
Signed-off-by: Chris Horn <chris.horn@hpe.com>
Change-Id: I4a20e92826df75812ef5b81979944526e4b94d83
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/48782
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Ian Ziemba <ian.ziemba@hpe.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Ron Gredvig <ron.gredvig@hpe.com>
#define CFS_KFI_FAIL_RECV_EAGAIN 0xF111
#define CFS_KFI_FAIL_RECV 0xF112
#define CFS_KFI_FAIL_MSG_UNPACK 0xF113
+#define CFS_KFI_FAIL_MSG_TYPE 0xF114
/* Maximum number of transaction keys supported. */
#define KFILND_EP_KEY_BITS 16U
return -EINVAL;
/* Progress transaction to failure if send should fail. */
- if (CFS_FAIL_CHECK(CFS_KFI_FAIL_SEND_EVENT)) {
+ if (CFS_FAIL_CHECK_VALUE(CFS_KFI_FAIL_MSG_TYPE,
+ tn->tn_tx_msg.msg->type) ||
+ CFS_FAIL_CHECK(CFS_KFI_FAIL_SEND_EVENT)) {
rc = kfilnd_ep_gen_fake_err(ep, &fake_error);
if (!rc)
return 0;