Whamcloud - gitweb
LU-11777 tests: add version check sanityn 102 53/33953/6
authorJames Nunez <jnunez@whamcloud.com>
Tue, 15 Jan 2019 16:08:17 +0000 (09:08 -0700)
committerOleg Drokin <green@whamcloud.com>
Wed, 27 Feb 2019 02:02:16 +0000 (02:02 +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.

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

index a3d505d..4695668 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
@@ -4492,6 +4493,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 ||