From 0706879579e08c4bbfe7840b7852f67ebef6c674 Mon Sep 17 00:00:00 2001 From: Fan Yong Date: Wed, 18 May 2016 15:52:31 +0800 Subject: [PATCH] LU-8328 tests: cleanup system after conf-sanity test_86 The conf-sanity test_86 reformats the OST1 device, it only checks whether the reformat works or not, but it does not reformat the MGS (or write conf) as to after reformatting the OST1, it cannot mount to the MGS, so if the subsequent tests do not reformat the system, then will get failure. Signed-off-by: Fan Yong Change-Id: I808d7d6c3fa2e57e8b644bd4af7350be006605c3 Reviewed-on: http://review.whamcloud.com/20987 Tested-by: Jenkins Reviewed-by: Emoly Liu Tested-by: Maloo Reviewed-by: Jian Yu Reviewed-by: Oleg Drokin --- lustre/tests/conf-sanity.sh | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/lustre/tests/conf-sanity.sh b/lustre/tests/conf-sanity.sh index dcfd372..b639d44 100755 --- a/lustre/tests/conf-sanity.sh +++ b/lustre/tests/conf-sanity.sh @@ -5839,6 +5839,15 @@ test_85() { } run_test 85 "osd_ost init: fail ea_fid_set" +cleanup_86() { + trap 0 + + # ost1 has already registered to the MGS before the reformat. + # So after reformatting it with option "-G", it could not be + # mounted to the MGS. Cleanup the system for subsequent tests. + reformat_and_config +} + test_86() { [ "$(facet_fstype ost1)" = "zfs" ] && skip "LU-6442: no such mkfs params for ZFS OSTs" && return @@ -5862,6 +5871,9 @@ test_86() { echo "params: $opts" + trap cleanup_86 EXIT ERR + + stopall add ost1 $opts || error "add ost1 failed with new params" local FOUNDSIZE=$(do_facet ost1 "$DEBUGFS -c -R stats $(ostdevname 1)" | @@ -5869,7 +5881,8 @@ test_86() { [[ $FOUNDSIZE == $NEWSIZE ]] || error "Flex block group size: $FOUNDSIZE, expected: $NEWSIZE" - return 0 + + cleanup_86 } run_test 86 "Replacing mkfs.lustre -G option" -- 1.8.3.1