Whamcloud - gitweb
LU-11779 tests: add version check for sanity-hsm 89/34589/2
authorJames Nunez <jnunez@whamcloud.com>
Wed, 3 Apr 2019 19:49:16 +0000 (13:49 -0600)
committerOleg Drokin <green@whamcloud.com>
Sun, 21 Apr 2019 05:47:20 +0000 (05:47 +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.

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

index eefb8ec..d67e960 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
 
 [ -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