From 0938b17bd93bf6cd702ddecbab790bad3a8ac1fb Mon Sep 17 00:00:00 2001 From: James Nunez Date: Wed, 3 Apr 2019 13:49:16 -0600 Subject: [PATCH] LU-11779 tests: add version check for sanity-hsm sanity-hsm test 255 was added to Lustre tag 2.12.0. sanity-hsm test 260c was modified with Lustre tag 2.12.0. Thus, we need to check that the server is 2.12.0 or later before running these tests. Fixes: e7d5c1681c07 (LU-11653 hsm: copytool registration wakes the coordinator) Fixes: b84bc6d895a0 (LU-11572 tests: make sanity-hsm test_260c reliable) Test-Parameters: trivial serverjob=lustre-b2_10 serverbuildno=168 testlist=sanity-hsm Test-Parameters: testlist=sanity-hsm Signed-off-by: James Nunez Change-Id: I1a5369ec864432a241a875c3430baa5a064b0dfe Reviewed-on: https://review.whamcloud.com/34589 Tested-by: Jenkins Reviewed-by: Andreas Dilger Tested-by: Maloo Reviewed-by: Wei Liu Reviewed-by: Oleg Drokin --- lustre/tests/sanity-hsm.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lustre/tests/sanity-hsm.sh b/lustre/tests/sanity-hsm.sh index eefb8ec..d67e960 100755 --- a/lustre/tests/sanity-hsm.sh +++ b/lustre/tests/sanity-hsm.sh @@ -24,6 +24,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 [ -n "$FILESET" ] && skip "Not functional for FILESET set" @@ -4672,6 +4673,9 @@ run_test 254b "Request counters are correctly incremented and decremented" test_255() { + [ $MDS1_VERSION -lt $(version_code 2.12.0) ] && + skip "Need MDS version at least 2.12.0" + local file="$DIR/$tdir/$tfile" local fid=$(create_empty_file "$file") @@ -4856,6 +4860,9 @@ run_test 260b "Restore request have priority over other requests" # mechanism in the coordinator. It might not make sense to keep it in the future test_260c() { + [ $MDS1_VERSION -lt $(version_code 2.12.0) ] && + skip "Need MDS version at least 2.12.0" + local -a files=("$DIR/$tdir/$tfile".{0..15}) local file -- 1.8.3.1