From 96fbf0935977a9669d2a3bb2612db8b7eba3e5a5 Mon Sep 17 00:00:00 2001 From: Quentin Bouget Date: Tue, 12 Dec 2017 12:09:19 +0000 Subject: [PATCH] LU-10347 tests: suspend the copytool in sanity-hsm/test_252 The copytool does not have to, and should not, process the archive request emitted in test_252 of sanity-hsm: the test needs the request to time out. This patch suspends the copytool until the request times out. Test-Parameters: trivial testlist=sanity-hsm Signed-off-by: Quentin Bouget Change-Id: I54d114eafb85b75e7f9160806cd3298bfa186b19 Reviewed-on: https://review.whamcloud.com/30492 Tested-by: Jenkins Tested-by: Maloo Reviewed-by: John L. Hammond Reviewed-by: Faccini Bruno Reviewed-by: Oleg Drokin --- lustre/tests/sanity-hsm.sh | 29 ++++++++++------------------- 1 file changed, 10 insertions(+), 19 deletions(-) diff --git a/lustre/tests/sanity-hsm.sh b/lustre/tests/sanity-hsm.sh index f244cd1..3906279 100755 --- a/lustre/tests/sanity-hsm.sh +++ b/lustre/tests/sanity-hsm.sh @@ -4729,36 +4729,27 @@ test_251() { run_test 251 "Coordinator request timeout" test_252() { - # test needs a running copytool - copytool setup -b 1 - mkdir -p $DIR/$tdir local f=$DIR/$tdir/$tfile - local fid=$(make_custom_file_for_progress $f 103 1048576) + local fid=$(create_empty_file "$f") - cdt_disable # to have a short test - local old_timeout=$(get_hsm_param active_request_timeout) - stack_trap "set_hsm_param active_request_timeout $old_timeout" EXIT - set_hsm_param active_request_timeout 20 - # to be sure the cdt will wake up frequently so - # it will be able to cancel the "old" request - local old_loop_period=$(get_hsm_param loop_period) - stack_trap "set_hsm_param loop_period $old_loop_period" EXIT - set_hsm_param loop_period 2 - cdt_enable + stack_trap "set_hsm_param loop_period $(get_hsm_param loop_period)" EXIT + set_hsm_param loop_period 1 - # clear locks to avoid extra delay caused by flush/cancel - # and thus prevent early copytool death to timeout. - cancel_lru_locks osc + copytool_setup + copytool_suspend $LFS hsm_archive --archive $HSM_ARCHIVE_NUMBER $f wait_request_state $fid ARCHIVE STARTED rm -f $f - # wait but less than active_request_timeout+grace_delay - sleep 25 + stack_trap "set_hsm_param active_request_timeout \ + $(get_hsm_param active_request_timeout)" EXIT + set_hsm_param active_request_timeout 1 + wait_request_state $fid ARCHIVE CANCELED + copytool_continue } run_test 252 "Timeout'ed running archive of a removed file should be canceled" -- 1.8.3.1