Whamcloud - gitweb
LU-11401 tests: add version check sanity-flr tests 55/33955/5
authorJames Nunez <jnunez@whamcloud.com>
Tue, 15 Jan 2019 00:48:17 +0000 (17:48 -0700)
committerOleg Drokin <green@whamcloud.com>
Mon, 18 Feb 2019 06:38:27 +0000 (06:38 +0000)
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 <jnunez@whamcloud.com>
Change-Id: I94c68e900d60e2b97d7f74c6629ee54bcb3a5480
Reviewed-on: https://review.whamcloud.com/33955
Tested-by: Jenkins
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Wei Liu <sarah@whamcloud.com>
Reviewed-by: Emoly Liu <emoly@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/tests/sanity-flr.sh

index 74cad1a..9902cda 100644 (file)
@@ -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