From 4ea695fd2cf205c24f30b6b3accd82723f87b0d4 Mon Sep 17 00:00:00 2001 From: Jian Yu Date: Tue, 9 Jan 2018 15:10:58 -0800 Subject: [PATCH] LU-10476 tests: add version check to sanity-dom and sanity-flr 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 Reviewed-on: https://review.whamcloud.com/30816 Tested-by: Jenkins Tested-by: Maloo Reviewed-by: Jinshan Xiong Reviewed-by: Bobi Jam Reviewed-by: Mike Pershin Reviewed-by: Oleg Drokin --- lustre/tests/sanity-dom.sh | 3 +++ lustre/tests/sanity-flr.sh | 3 +++ 2 files changed, 6 insertions(+) diff --git a/lustre/tests/sanity-dom.sh b/lustre/tests/sanity-dom.sh index 765b9bc..4931786 100644 --- a/lustre/tests/sanity-dom.sh +++ b/lustre/tests/sanity-dom.sh @@ -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"} diff --git a/lustre/tests/sanity-flr.sh b/lustre/tests/sanity-flr.sh index 877487f..025a058 100644 --- a/lustre/tests/sanity-flr.sh +++ b/lustre/tests/sanity-flr.sh @@ -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 -- 1.8.3.1