Whamcloud - gitweb
LU-11779 tests: add version check for sanity-hsm 35/34735/2
authorJames Nunez <jnunez@whamcloud.com>
Wed, 3 Apr 2019 19:49:16 +0000 (13:49 -0600)
committerOleg Drokin <green@whamcloud.com>
Fri, 10 May 2019 21:04:02 +0000 (21:04 +0000)
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.

This patch is a back port from
Lustre-commit: 0938b17bd93bf6cd702ddecbab790bad3a8ac1fb
Lustre-change: https://review.whamcloud.com/34589

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 <jnunez@whamcloud.com>
Change-Id: I1a5369ec864432a241a875c3430baa5a064b0dfe
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Wei Liu <sarah@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/34735
Tested-by: Jenkins
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/tests/sanity-hsm.sh

index 2035603..4a035e5 100755 (executable)
@@ -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
 
 MULTIOP=${MULTIOP:-multiop}
@@ -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