From: Jian Yu Date: Fri, 7 Jun 2013 08:09:17 +0000 (+0800) Subject: LU-3219 tests: add version check code to sanityn test 71 X-Git-Tag: 2.4.52~5 X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=commitdiff_plain;h=282b9824fe76c4e2a59636ea6fc20677d509679a 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 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: Ide9d42d4634f51110cb7036e43060b591ed970eb Reviewed-on: http://review.whamcloud.com/6585 Tested-by: Hudson Reviewed-by: Bob Glossman Tested-by: Maloo Reviewed-by: Niu Yawei Reviewed-by: Oleg Drokin --- diff --git a/lustre/tests/sanityn.sh b/lustre/tests/sanityn.sh index 951c1bd..ba50004 100644 --- a/lustre/tests/sanityn.sh +++ b/lustre/tests/sanityn.sh @@ -2435,12 +2435,22 @@ test_70b() { # LU-2781 run_test 70b "remove files after calling rm_entry" 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" ] && + "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"