Whamcloud - gitweb
LU-10476 tests: add version check to sanity-dom and sanity-flr 16/30816/3
authorJian Yu <jian.yu@intel.com>
Tue, 9 Jan 2018 23:10:58 +0000 (15:10 -0800)
committerOleg Drokin <oleg.drokin@intel.com>
Sat, 20 Jan 2018 06:19:53 +0000 (06:19 +0000)
This patch adds Lustre version check codes into sanity-dom.sh
and sanity-flr.sh to make the tests interoperate with servers
that do not support the DOM and FLR features.

Test-Parameters: trivial \
mdsjob=lustre-b2_10 ossjob=lustre-b2_10 serverbuildno=52 \
testlist=sanity-dom,sanity-flr

Change-Id: If36125e84a424976a60b9bcc1e2c94c5fab2ac7d
Signed-off-by: Jian Yu <jian.yu@intel.com>
Reviewed-on: https://review.whamcloud.com/30816
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
Reviewed-by: Bobi Jam <bobijam@hotmail.com>
Reviewed-by: Mike Pershin <mike.pershin@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
lustre/tests/sanity-dom.sh
lustre/tests/sanity-flr.sh

index 765b9bc..4931786 100644 (file)
@@ -20,6 +20,9 @@ init_test_env $@
 . ${CONFIG:=$LUSTRE/tests/cfg/$NAME.sh}
 init_logging
 
+[[ $(lustre_version_code $SINGLEMDS) -ge $(version_code 2.10.56) ]] ||
+       { skip "Need MDS version at least 2.10.56"; exit 0; }
+
 MULTIOP=${MULTIOP:-multiop}
 OPENFILE=${OPENFILE:-openfile}
 MOUNT_2=${MOUNT_2:-"yes"}
index 877487f..025a058 100644 (file)
@@ -19,6 +19,9 @@ init_test_env $@
 . ${CONFIG:=$LUSTRE/tests/cfg/$NAME.sh}
 init_logging
 
+[[ $(lustre_version_code $SINGLEMDS) -ge $(version_code 2.10.56) ]] ||
+       { skip "Need MDS version at least 2.10.56"; exit 0; }
+
 [ $UID -eq 0 -a $RUNAS_ID -eq 0 ] &&
        error "\$RUNAS_ID set to 0, but \$UID is also 0!"
 check_runas_id $RUNAS_ID $RUNAS_GID $RUNAS