From ae75822728635169a1e23c5d71df3ad122dff0a3 Mon Sep 17 00:00:00 2001 From: Mikhail Pershin Date: Tue, 30 Dec 2014 11:05:17 +0300 Subject: [PATCH] LU-4458 test: take fail_val into account for pause_bulk() pause_bulk(), set_nodes_failloc() and reset_fail_loc() should care about fail_val as well for compatibility with master Signed-off-by: Mikhail Pershin Change-Id: I283a23c67a633a5db479e421c96c164e1e07d05c Reviewed-on: http://review.whamcloud.com/13205 Tested-by: Jenkins Tested-by: Maloo Reviewed-by: Li Wei Reviewed-by: Jian Yu Reviewed-by: Oleg Drokin --- lustre/tests/test-framework.sh | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/lustre/tests/test-framework.sh b/lustre/tests/test-framework.sh index 92eec63..22ff37c 100644 --- a/lustre/tests/test-framework.sh +++ b/lustre/tests/test-framework.sh @@ -4255,12 +4255,15 @@ drop_update_reply() { pause_bulk() { #define OBD_FAIL_OST_BRW_PAUSE_BULK 0x214 - RC=0 - do_facet ost1 lctl set_param fail_loc=0x214 - do_facet client "$1" || RC=$? - do_facet client "sync" - do_facet ost1 lctl set_param fail_loc=0 - return $RC + RC=0 + + local timeout=${2:-0} + # default is (obd_timeout / 4) if unspecified + do_facet ost1 lctl set_param fail_val=$timeout fail_loc=0x80000214 + do_facet client "$1" || RC=$? + do_facet client "sync" + do_facet ost1 lctl set_param fail_loc=0 + return $RC } drop_ldlm_cancel() { @@ -4317,7 +4320,7 @@ clear_failloc() { } set_nodes_failloc () { - do_nodes $(comma_list $1) lctl set_param fail_loc=$2 + do_nodes $(comma_list $1) lctl set_param fail_val=0 fail_loc=$2 } cancel_lru_locks() { @@ -4654,9 +4657,10 @@ check_mds() { } reset_fail_loc () { - echo -n "Resetting fail_loc on all nodes..." - do_nodes $(comma_list $(nodes_list)) "lctl set_param -n fail_loc=0 2>/dev/null || true" - echo done. + echo -n "Resetting fail_loc on all nodes..." + do_nodes $(comma_list $(nodes_list)) "lctl set_param -n fail_loc=0 \ + fail_val=0 2>/dev/null || true" + echo done. } -- 1.8.3.1