X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=blobdiff_plain;f=lustre%2Ftests%2Fsanity-flr.sh;h=07e52af4c08d970dc8edf073ff5bb509c375e0aa;hp=d76e2da32253585fe774deb166071ba1f87b0ca9;hb=8befc64e5aabe9b9bdca49f51830f25b3f747019;hpb=3911f551b759068c16d390cb7b5661108d7e6cb0 diff --git a/lustre/tests/sanity-flr.sh b/lustre/tests/sanity-flr.sh index d76e2da..07e52af 100644 --- a/lustre/tests/sanity-flr.sh +++ b/lustre/tests/sanity-flr.sh @@ -767,6 +767,24 @@ test_0h() { } run_test 0h "set, clear and test flags for FLR files" +test_0j() { + $LFS mirror create -N2 $DIR/$tfile || error "create $DIR/$tfile failed" + + cp /etc/hosts $DIR/$tfile || error "write to $DIR/$tfile failed" + $LFS mirror resync $DIR/$tfile || error "resync $DIR/$tfile failed" + cmp /etc/hosts $DIR/$tfile || error "cmp with /etc/hosts failed" + + $LFS mirror read -N2 -o $TMP/$tfile $DIR/$tfile || "read mirror failed" + stack_trap "rm -f $TMP/$tfile" + cmp $TMP/$tfile $DIR/$tfile || error "cmp with $TMP/$tfile failed" + $LFS mirror write -N2 -i /etc/passwd $DIR/$tfile || "write failed" + $LFS setstripe --comp-set -I 65537 --comp-flags=stale $DIR/$tfile || + error "set component 1 stale failed" + $LFS mirror resync $DIR/$tfile || error "resync $DIR/$tfile failed" + cmp /etc/passwd $DIR/$tfile || error "cmp with /etc/passwd failed" +} +run_test 0j "test lfs mirror read/write commands" + test_1() { local tf=$DIR/$tfile local mirror_count=16 # LUSTRE_MIRROR_COUNT_MAX