From: James Nunez Date: Tue, 15 Jan 2019 00:48:17 +0000 (-0700) Subject: LU-11401 tests: add version check sanity-flr tests X-Git-Tag: 2.12.52~67 X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=commitdiff_plain;h=fa3b858d5c5b9124591e05a5dcdd98a3ee3619c6 LU-11401 tests: add version check sanity-flr tests sanity-flr test 48 and 203 was added to Lustre tag 2.11.55. Thus, we need to check that the server version is 2.11.55 or later before running test 48 and 203. sanity-flr test 0h checks for a file inheriting the directory layout. sanity-flr test 37 added ‘lfs mirror write’ functionality. Inheritance was fixed and ‘lfs mirror write’ was added in Lustre tag 2.11.57. Thus, we need to check that the server version is 2.11.57 or later before running test 0h and 37. Test-Parameters: trivial testlist=sanity-flr Test-Parameters: serverjob=lustre-b2_11 serverbuildno=2 testlist=sanity-flr Signed-off-by: James Nunez Change-Id: I94c68e900d60e2b97d7f74c6629ee54bcb3a5480 Reviewed-on: https://review.whamcloud.com/33955 Tested-by: Jenkins Tested-by: Maloo Reviewed-by: Wei Liu Reviewed-by: Emoly Liu Reviewed-by: Oleg Drokin --- diff --git a/lustre/tests/sanity-flr.sh b/lustre/tests/sanity-flr.sh index 74cad1a..9902cda 100644 --- a/lustre/tests/sanity-flr.sh +++ b/lustre/tests/sanity-flr.sh @@ -17,6 +17,7 @@ LUSTRE=${LUSTRE:-$(cd $(dirname $0)/..; echo $PWD)} . $LUSTRE/tests/test-framework.sh init_test_env $@ . ${CONFIG:=$LUSTRE/tests/cfg/$NAME.sh} +get_lustre_env init_logging [[ $(lustre_version_code $SINGLEMDS) -ge $(version_code 2.10.56) ]] || @@ -674,6 +675,9 @@ test_0g() { run_test 0g "lfs mirror create flags support" test_0h() { + [ $MDS1_VERSION -lt $(version_code 2.11.57) ] && + skip "Need MDS version at least 2.11.57" + local td=$DIR/$tdir local tf=$td/$tfile local ids @@ -1270,6 +1274,9 @@ create_files_37() { test_37() { + [ $MDS1_VERSION -lt $(version_code 2.11.57) ] && + skip "Need MDS version at least 2.11.57" + local tf=$DIR/$tfile local tf2=$DIR/$tfile-2 local tf3=$DIR/$tfile-3 @@ -1981,6 +1988,9 @@ test_47() { run_test 47 "Verify mirror obj alloc" test_48() { + [ $MDS1_VERSION -lt $(version_code 2.11.55) ] && + skip "Need MDS version at least 2.11.55" + local tf=$DIR/$tfile rm -f $tf @@ -2254,7 +2264,9 @@ test_202() { run_test 202 "lfs setstripe --add-component wide striping" test_203() { - [[ $OSTCOUNT -lt 2 ]] && skip "need >= 2 OSTs" && return + [ $MDS1_VERSION -lt $(version_code 2.11.55) ] && + skip "Need MDS version at least 2.11.55" + [[ $OSTCOUNT -lt 2 ]] && skip "need >= 2 OSTs" local tf=$DIR/$tfile