Whamcloud - gitweb
LU-11402 tests: add version check sanity-quota 60 18/33418/8
authorJames Nunez <jnunez@whamcloud.com>
Wed, 2 Jan 2019 22:38:58 +0000 (15:38 -0700)
committerOleg Drokin <green@whamcloud.com>
Wed, 23 Jan 2019 09:17:35 +0000 (09:17 +0000)
sanity-quota test 60 was added to Lustre tag 2.11.53. Thus,
we need to check that the server is 2.11.53 or later before
running test 60.

Test-Parameters: trivial serverjob=lustre-b2_10 serverbuildno=152 testlist=sanity-quota
Test-Parameters: testlist=sanity-quota
Signed-off-by: James Nunez <jnunez@whamcloud.com>
Change-Id: I5db738f0776b5615165977df1708f197f215b994
Reviewed-on: https://review.whamcloud.com/33418
Tested-by: Jenkins
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Wei Liu <sarah@whamcloud.com>
Reviewed-by: Jian Yu <yujian@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/tests/sanity-quota.sh

index af56cbc..2b7aa33 100755 (executable)
@@ -34,6 +34,7 @@ LUSTRE=${LUSTRE:-$(cd $(dirname $0)/..; echo $PWD)}
 . $LUSTRE/tests/test-framework.sh
 init_test_env $@
 . ${CONFIG:=$LUSTRE/tests/cfg/$NAME.sh}
 . $LUSTRE/tests/test-framework.sh
 init_test_env $@
 . ${CONFIG:=$LUSTRE/tests/cfg/$NAME.sh}
+get_lustre_env
 init_logging
 DIRECTIO=${DIRECTIO:-$LUSTRE/tests/directio}
 
 init_logging
 DIRECTIO=${DIRECTIO:-$LUSTRE/tests/directio}
 
@@ -3114,8 +3115,11 @@ test_59() {
 run_test 59 "lfs project dosen't crash kernel with project disabled"
 
 test_60() {
 run_test 59 "lfs project dosen't crash kernel with project disabled"
 
 test_60() {
+       [ $MDS1_VERSION -lt $(version_code 2.11.53) ] &&
+               skip "Needs MDS version 2.11.53 or later."
        setup_quota_test || error "setup quota failed with $?"
        trap cleanup_quota_test EXIT
        setup_quota_test || error "setup quota failed with $?"
        trap cleanup_quota_test EXIT
+
        local testfile=$DIR/$tdir/$tfile
        local limit=100
 
        local testfile=$DIR/$tdir/$tfile
        local limit=100