From e4e0b06a3b825f30d011d179a5800525bfe8edfb Mon Sep 17 00:00:00 2001 From: Jian Yu Date: Fri, 7 Jun 2013 15:53:05 +0800 Subject: [PATCH] LU-3219 tests: add version check code to sanityn test 71 This patch adds Lustre version check codes into sanityn test 71 to make the test work with servers which do not have the following patch: Lustre-commit: 58444c4e9bc58e192f0bc0c163a5d51d42ba4255 Lustre-change: http://review.whamcloud.com/6127 or Lustre-commit: 6a4ea7d154b6c016f482662463c9d2186176fee0 Lustre-change: http://review.whamcloud.com/6377 Since ZFS is not supported in Lustre 2.1.x and facet_fstype() is not implemented in Lustre 2.1.x test framework, the patch also removes the lines that check the ZFS backend filesystem. Test-Parameters: envdefinitions=SLOW=yes,ENABLE_QUOTA=yes \ clientdistro=el6 serverdistro=el6 clientarch=x86_64 \ serverarch=x86_64 serverjob=lustre-b2_1 serverbuildno=191 \ testlist=sanityn Signed-off-by: Jian Yu Change-Id: I16f96d28b0c9987274872ce1f4031ba0766d06c9 Reviewed-on: http://review.whamcloud.com/6584 Tested-by: Hudson Tested-by: Maloo Reviewed-by: Niu Yawei Reviewed-by: Bob Glossman Reviewed-by: Oleg Drokin --- lustre/tests/sanityn.sh | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/lustre/tests/sanityn.sh b/lustre/tests/sanityn.sh index 20a5224..aa249d9 100644 --- a/lustre/tests/sanityn.sh +++ b/lustre/tests/sanityn.sh @@ -1896,13 +1896,20 @@ test_50() { run_test 50 "osc lvb attrs: enqueue vs. CP AST ==============" test_71() { + local server_version=$(lustre_version_code $SINGLEMDS) + + [[ $server_version -lt $(version_code 2.1.6) ]] && + skip "Need MDS version at least 2.1.6" && return + + # Patch not applied to 2.2 and 2.3 branches + [[ $server_version -ge $(version_code 2.2.0) ]] && + [[ $server_version -lt $(version_code 2.4.0) ]] && + skip "Need MDS version at least 2.4.0" && return + checkfiemap --test || { skip "checkfiemap not runnable: $?" && return; } # write data this way: hole - data - hole - data dd if=/dev/urandom of=$DIR1/$tfile bs=40K seek=1 count=1 - [ "$(facet_fstype ost$(($($GETSTRIPE -i $DIR1/$tfile) + 1)))" = \ - "zfs" ] && - skip "ORI-366/LU-1941: FIEMAP unimplemented on ZFS" && return 0 dd if=/dev/urandom of=$DIR1/$tfile bs=40K seek=3 count=1 GET_STAT="lctl get_param -n ldlm.services.ldlm_cbd.stats" stat $DIR2/$tfile -- 1.8.3.1