X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=blobdiff_plain;f=lustre%2Ftests%2Fsanity.sh;h=3c7e54eae68fb80121ef61e428609ba3c326cb9c;hp=7e9c57233208766ed46ac48bdcae2ab0d090fd15;hb=76b9eecdebf830606b021079148eaefa6aab99cc;hpb=a857446dc6480841ab1e832970d3958f3962a885 diff --git a/lustre/tests/sanity.sh b/lustre/tests/sanity.sh index 7e9c572..3c7e54e 100755 --- a/lustre/tests/sanity.sh +++ b/lustre/tests/sanity.sh @@ -19994,6 +19994,33 @@ test_808() { } run_test 808 "Check trusted.som xattr not logged in Changelogs" +check_som_nodata() +{ + $LFS getsom $1 + [[ $? -eq 61 ]] || error "DoM-only file $1 has SOM xattr" +} + +test_809() { + [ $(lustre_version_code $SINGLEMDS) -lt $(version_code 2.11.56) ] && + skip "Need MDS version at least 2.11.56" && return + + $LFS setstripe -E 1M -L mdt $DIR/$tfile || + error "failed to create DoM-only file $DIR/$tfile" + touch $DIR/$tfile || error "touch $tfile failed" + check_som_nodata $DIR/$tfile + + dd if=/dev/zero of=$DIR/$tfile bs=2048 count=1 || + error "write $tfile failed" + check_som_nodata $DIR/$tfile + + $TRUNCATE $DIR/$tfile 1234 + check_som_nodata $DIR/$tfile + + $TRUNCATE $DIR/$tfile 4097 + check_som_nodata $DIR/$file +} +run_test 809 "Verify no SOM xattr store for DoM-only files" + # # tests that do cleanup/setup should be run at the end #