From be0c22a64ae1675d4995ab3ae6da75fbd04f9426 Mon Sep 17 00:00:00 2001 From: Fan Yong Date: Thu, 15 Oct 2015 00:26:45 +0800 Subject: [PATCH] LU-7144 tests: skip scrub/lfsck test under interoperation Since the scrub/lfsck test are only for server side logic, it is unnecessary to test scrub/lfsck under interoperation mode, skip them. Signed-off-by: Fan Yong Change-Id: I044030b3bace787809d7cfd5622000b44a8be789 Reviewed-on: http://review.whamcloud.com/17520 Reviewed-by: Andreas Dilger Tested-by: Jenkins Reviewed-by: Jian Yu Tested-by: Maloo Reviewed-by: Oleg Drokin --- lustre/tests/sanity-lfsck.sh | 14 ++++++++++---- lustre/tests/sanity-scrub.sh | 26 ++++++++++++++++---------- 2 files changed, 26 insertions(+), 14 deletions(-) diff --git a/lustre/tests/sanity-lfsck.sh b/lustre/tests/sanity-lfsck.sh index 8a65275..9290efd 100644 --- a/lustre/tests/sanity-lfsck.sh +++ b/lustre/tests/sanity-lfsck.sh @@ -22,6 +22,16 @@ init_logging require_dsh_mds || exit 0 +load_modules + +if ! check_versions; then + skip "It is NOT necessary to test lfsck under interoperation mode" + exit 0 +fi + +[[ $(lustre_version_code $SINGLEMDS) -lt $(version_code 2.3.60) ]] && + skip "Need MDS version at least 2.3.60" && exit 0 + LTIME=${LTIME:-120} SAVED_MDSSIZE=${MDSSIZE} @@ -38,10 +48,6 @@ OSTSIZE=100000 formatall setupall -[[ $(lustre_version_code $SINGLEMDS) -lt $(version_code 2.3.60) ]] && - skip "Need MDS version at least 2.3.60" && check_and_cleanup_lustre && - exit 0 - [[ $(lustre_version_code $SINGLEMDS) -le $(version_code 2.4.90) ]] && ALWAYS_EXCEPT="$ALWAYS_EXCEPT 2c" diff --git a/lustre/tests/sanity-scrub.sh b/lustre/tests/sanity-scrub.sh index 18280a7..8e91ad4 100644 --- a/lustre/tests/sanity-scrub.sh +++ b/lustre/tests/sanity-scrub.sh @@ -21,6 +21,22 @@ init_logging require_dsh_mds || exit 0 +load_modules + +if ! check_versions; then + skip "It is NOT necessary to test scrub under interoperation mode" + exit 0 +fi + +[ $(facet_fstype $SINGLEMDS) != "ldiskfs" ] && + skip "test OI scrub only for ldiskfs" && exit 0 + +[ $(facet_fstype ost1) != "ldiskfs" ] && + skip "test OI scrub only for ldiskfs" && exit 0 + +[[ $(lustre_version_code $SINGLEMDS) -lt $(version_code 2.2.90) ]] && + skip "Need MDS version at least 2.2.90" && exit 0 + SAVED_MDSSIZE=${MDSSIZE} SAVED_OSTSIZE=${OSTSIZE} SAVED_OSTCOUNT=${OSTCOUNT} @@ -39,16 +55,6 @@ MOUNT_2="" formatall setupall -[ $(facet_fstype $SINGLEMDS) != "ldiskfs" ] && - skip "test OI scrub only for ldiskfs" && check_and_cleanup_lustre && - exit 0 -[ $(facet_fstype ost1) != "ldiskfs" ] && - skip "test OI scrub only for ldiskfs" && check_and_cleanup_lustre && - exit 0 -[[ $(lustre_version_code $SINGLEMDS) -lt $(version_code 2.2.90) ]] && - skip "Need MDS version at least 2.2.90" && check_and_cleanup_lustre && - exit 0 - [[ $(lustre_version_code $SINGLEMDS) -lt $(version_code 2.3.90) ]] && ALWAYS_EXCEPT="$ALWAYS_EXCEPT 1a" -- 1.8.3.1