From: Fan Yong Date: Fri, 26 May 2017 03:09:32 +0000 (+0800) Subject: LU-9560 tests: sanity test_801a sleeps more time X-Git-Tag: 2.9.59~35 X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=commitdiff_plain;h=e5b704eb23b859ad53bfd64538b346b4d40b23cb LU-9560 tests: sanity test_801a sleeps more time If the barrier_freeze thread sleep time is too short, then it is possible that before the barrier_stat thread scheduled, the barrier_freeze thread has gone through phase "freezing_p1", that will cause test failure. This patch makes the barrier_freeze thread to sleep more long time, then the barrier_stat thread can check its status properly. Test-Parameters: trivial Signed-off-by: Fan Yong Change-Id: Iebbc05a1d86553b484bd7093f147e5ac4b58e199 Reviewed-on: https://review.whamcloud.com/27288 Tested-by: Jenkins Reviewed-by: Andreas Dilger Reviewed-by: Niu Yawei Reviewed-by: Jian Yu Tested-by: Maloo --- diff --git a/lustre/tests/sanity.sh b/lustre/tests/sanity.sh index a436192..9f4fa37 100755 --- a/lustre/tests/sanity.sh +++ b/lustre/tests/sanity.sh @@ -16389,13 +16389,15 @@ post_801() { test_801a() { prep_801 + echo "Start barrier_freeze at: $(date)" #define OBD_FAIL_BARRIER_DELAY 0x2202 - do_facet mgs $LCTL set_param fail_val=3 fail_loc=0x2202 + do_facet mgs $LCTL set_param fail_val=5 fail_loc=0x2202 do_facet mgs $LCTL barrier_freeze $FSNAME 10 & - sleep 1 + sleep 2 local b_status=$(do_facet mgs $LCTL barrier_stat $FSNAME | awk '/The barrier for/ { print $7 }') + echo "Got barrier status at: $(date)" [ "$b_status" = "'freezing_p1'" ] || error "(1) unexpected barrier status $b_status" @@ -16424,13 +16426,15 @@ test_801a() { [ "$b_status" = "'frozen'" ] || error "(5) unexpected barrier status $b_status" + echo "Start barrier_thaw at: $(date)" #define OBD_FAIL_BARRIER_DELAY 0x2202 - do_facet mgs $LCTL set_param fail_val=3 fail_loc=0x2202 + do_facet mgs $LCTL set_param fail_val=5 fail_loc=0x2202 do_facet mgs $LCTL barrier_thaw $FSNAME & - sleep 1 + sleep 2 b_status=$(do_facet mgs $LCTL barrier_stat $FSNAME | awk '/The barrier for/ { print $7 }') + echo "Got barrier status at: $(date)" [ "$b_status" = "'thawing'" ] || error "(6) unexpected barrier status $b_status"