Whamcloud - gitweb
LU-2384 kerberos: Support for MIT-kerberos >=1.8.X is broken
[fs/lustre-release.git] / lustre / tests / sanity-hsm.sh
index a03a327..7e852fe 100644 (file)
@@ -31,19 +31,21 @@ init_test_env $@
 . ${CONFIG:=$LUSTRE/tests/cfg/$NAME.sh}
 init_logging
 
-
 SANITYLOG=${TESTSUITELOG:-$TMP/$(basename $0 .sh).log}
 FAIL_ON_ERROR=false
 
 [ "$SANITYLOG" ] && rm -f $SANITYLOG || true
 check_and_setup_lustre
 
+if [ $(lustre_version_code $SINGLEMDS) -lt $(version_code 2.3.61) ]; then
+       skip_env "Need MDS version at least 2.3.61" && exit
+fi
+
 DIR=${DIR:-$MOUNT}
 assert_DIR
 
 build_test_filter
 
-
 test_1() {
        mkdir -p $DIR/$tdir
        chmod 777 $DIR/$tdir
@@ -78,7 +80,6 @@ test_1() {
            error "root could not clear hsm state"
        $LFS hsm_state $TESTFILE | grep -q "(0x00000000)" ||
            error "wrong hsm state, should be empty"
-
 }
 run_test 1 "lfs hsm flags root/non-root access"
 
@@ -146,7 +147,7 @@ test_3() {
        $LFS hsm_set --exists $TESTFILE.append ||
                error "user could not change hsm flags"
        dd if=/etc/passwd of=$TESTFILE.append bs=1 count=3 \
-          conv=notrunc,fdatasync oflag=append status=noxfer ||
+          conv=notrunc oflag=append status=noxfer ||
                error "could not append to test file"
        $LFS hsm_state $TESTFILE.append | grep -q " (0x00000003)" ||
                error "wrong hsm state: !0x3"
@@ -156,7 +157,7 @@ test_3() {
        $LFS hsm_set --exists $TESTFILE.modify ||
                error "user could not change hsm flags"
        dd if=/dev/zero of=$TESTFILE.modify bs=1 count=3 \
-          conv=notrunc,fdatasync status=noxfer ||
+          conv=notrunc status=noxfer ||
                error "could not modify test file"
        $LFS hsm_state $TESTFILE.modify | grep -q " (0x00000003)" ||
                error "wrong hsm state: !0x3"
@@ -179,7 +180,6 @@ test_3() {
 }
 run_test 3 "Check file dirtyness when opening for write"
 
-
 log "cleanup: ======================================================"
 cd $ORIG_PWD
 check_and_cleanup_lustre
@@ -187,4 +187,3 @@ echo '=========================== finished ==============================='
 [ -f "$SANITYLOG" ] && cat $SANITYLOG && grep -q FAIL $SANITYLOG && exit 1 ||
        true
 echo "$0: completed"
-