From 20787a89ad7dc99290c4d9cff8247b0a532e92b9 Mon Sep 17 00:00:00 2001 From: Yang Sheng Date: Tue, 29 Aug 2017 03:30:13 +0800 Subject: [PATCH] LU-9908 tests: force umount client in test 70e, 41b, and 105 In test_70e, import state may not update while mds stopping. Since statfs will be invoked in sles12 before umounting, so umount with force flag to avoid waitting a long time. Add -f to stopall call in test-framework for the same reason, to do umount with force flag. Signed-off-by: Yang Sheng Change-Id: I3d1e73b3501e98008ef18c05f7b5498d12cb46fb Reviewed-on: https://review.whamcloud.com/28767 Tested-by: Jenkins Tested-by: Maloo Reviewed-by: Emoly Liu Reviewed-by: Jian Yu Reviewed-by: Oleg Drokin --- lustre/tests/conf-sanity.sh | 9 ++++++--- lustre/tests/test-framework.sh | 2 +- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/lustre/tests/conf-sanity.sh b/lustre/tests/conf-sanity.sh index 7fd8581..15f59ed 100644 --- a/lustre/tests/conf-sanity.sh +++ b/lustre/tests/conf-sanity.sh @@ -255,7 +255,9 @@ cleanup_nocli() { } cleanup() { - umount_client $MOUNT || return 200 + local force="" + [ "x$1" != "x" ] && force='-f' + umount_client $MOUNT $force|| return 200 cleanup_nocli || return $? } @@ -2890,7 +2892,7 @@ test_41b() { echo "blah blah" > $MOUNT/$tfile cat $MOUNT/$tfile || error "cat $MOUNT/$tfile failed" - umount_client $MOUNT || error "umount_client $MOUNT failed" + umount_client $MOUNT -f || error "umount_client $MOUNT failed" stop_ost || error "Unable to stop OST1" stop_mds || error "Unable to stop MDS" stop_mds || error "Unable to stop MDS on second try" @@ -5022,6 +5024,7 @@ test_70e() { soc=$(do_facet mds1 "$LCTL get_param -n \ mdt.*MDT0000.sync_lock_cancel") [ $soc == "never" ] || error "SoC enabled on single MDS" + umount_client $MOUNT -f > /dev/null cleanup || error "cleanup failed with $?" } @@ -7431,7 +7434,7 @@ error_and_umount() { } test_105() { - cleanup + cleanup -f reformat setup mkdir -p $TMP/$tdir diff --git a/lustre/tests/test-framework.sh b/lustre/tests/test-framework.sh index b0634e5..ed94924 100755 --- a/lustre/tests/test-framework.sh +++ b/lustre/tests/test-framework.sh @@ -3969,7 +3969,7 @@ format_ost() { } formatall() { - stopall + stopall -f # Set hostid for ZFS/SPL zpool import protection # (Assumes MDS version is also OSS version) if [ $(lustre_version_code $SINGLEMDS) -ge $(version_code 2.8.54) ]; -- 1.8.3.1