Whamcloud - gitweb
LU-11777 tests: add version check sanityn 102 34/34534/3
authorJames Nunez <jnunez@whamcloud.com>
Thu, 28 Mar 2019 18:44:55 +0000 (12:44 -0600)
committerOleg Drokin <green@whamcloud.com>
Mon, 8 Apr 2019 06:27:44 +0000 (06:27 +0000)
sanityn test 102 was added to Lustre tag 2.11.57. Thus,
we need to check that the server is 2.11.57 or later
before running test 102.

This patch is a back port from
Lustre-commit: 0a567ae4f3b0a4152bb8428244f7c2993584364e
Lustre-change: https://review.whamcloud.com/33953

Test-Parameters: trivial testlist=sanityn
Signed-off-by: James Nunez <jnunez@whamcloud.com>
Reviewed-by: Wei Liu <sarah@whamcloud.com>
Reviewed-by: Emoly Liu <emoly@whamcloud.com>
Change-Id: I5e34280db7bfc884fea784401406abfde57b9c98
Reviewed-on: https://review.whamcloud.com/34534
Tested-by: Jenkins
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/tests/sanityn.sh

index 42beac1..b779cd1 100755 (executable)
@@ -31,6 +31,7 @@ CLEANUP=${CLEANUP:-:}
 SETUP=${SETUP:-:}
 init_test_env $@
 . ${CONFIG:=$LUSTRE/tests/cfg/$NAME.sh}
+get_lustre_env
 init_logging
 
 if [ $(facet_fstype $SINGLEMDS) = "zfs" ]; then
@@ -4475,6 +4476,9 @@ run_test 101c "Discard DoM data on close-unlink"
 # This test opens the file normally on $DIR1, which is on one mount, and then
 # opens it by handle on $DIR2, which is on a different mount.
 test_102() {
+       [ $MDS1_VERSION -lt $(version_code 2.11.57) ] &&
+               skip "Needs MDS version 2.11.57 or later"
+
        echo "Test file_handle syscalls" > $DIR/$tfile ||
                error "write failed"
        check_fhandle_syscalls $DIR/$tfile $DIR2 ||