From 551dc77e6ecd590d35fe7759124b98961642e831 Mon Sep 17 00:00:00 2001 From: Niu Yawei Date: Mon, 18 May 2015 06:13:47 -0400 Subject: [PATCH] LU-6573 test: fix sanity test_224c It should always wait for the changing to the at_max/obd_timeout taking effect. Signed-off-by: Niu Yawei Change-Id: I681ecb4a72c0b5f4f69e92341e7bde1b554c12a5 Reviewed-on: http://review.whamcloud.com/14844 Tested-by: Jenkins Reviewed-by: Jian Yu Reviewed-by: Andreas Dilger Tested-by: Andreas Dilger --- lustre/tests/sanity.sh | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/lustre/tests/sanity.sh b/lustre/tests/sanity.sh index b37ceb6..7bb9c3a 100644 --- a/lustre/tests/sanity.sh +++ b/lustre/tests/sanity.sh @@ -12008,12 +12008,19 @@ test_224c() { # LU-6441 [ $PARALLEL == "yes" ] && skip "skip parallel run" && return local pages_per_rpc=$($LCTL get_param \ osc.*.max_pages_per_rpc) - local at_max=$(do_facet mgs "$LCTL get_param -n at_max") - local timeout=$(do_facet mgs "$LCTL get_param -n timeout") + local at_max=$($LCTL get_param -n at_max) + local timeout=$($LCTL get_param -n timeout) + local test_at="$LCTL get_param -n at_max" + local param_at="$FSNAME.sys.at_max" + local test_timeout="$LCTL get_param -n timeout" + local param_timeout="$FSNAME.sys.timeout" $LCTL set_param -n osc.*.max_pages_per_rpc=1024 - do_facet mgs "$LCTL conf_param $FSNAME.sys.at_max=0" - do_facet mgs "$LCTL conf_param $FSNAME.sys.timeout=5" + + set_conf_param_and_check client "$test_at" "$param_at" 0 || + error "conf_param at_max=0 failed" + set_conf_param_and_check client "$test_timeout" "$param_timeout" 5 || + error "conf_param timeout=5 failed" #define OBD_FAIL_PTLRPC_CLIENT_BULK_CB3 0x520 $LCTL set_param fail_loc=0x520 @@ -12021,10 +12028,11 @@ test_224c() { # LU-6441 sync $LCTL set_param fail_loc=0 - do_facet mgs "$LCTL conf_param $FSNAME.sys.at_max=" \ - "$at_max" - do_facet mgs "$LCTL conf_param $FSNAME.sys.timeout=" \ - "$timeout" + set_conf_param_and_check client "$test_at" "$param_at" $at_max || + error "conf_param at_max=$at_max failed" + set_conf_param_and_check client "$test_timeout" "$param_timeout" \ + $timeout || error "conf_param timeout=$timeout failed" + $LCTL set_param -n $pages_per_rpc } run_test 224c "Don't hang if one of md lost during large bulk RPC" -- 1.8.3.1