diff --git a/lustre/tests/sanityn.sh b/lustre/tests/sanityn.sh index 918dbac5b5..b44502e31c 100755 --- a/lustre/tests/sanityn.sh +++ b/lustre/tests/sanityn.sh @@ -746,6 +746,25 @@ test_26b() { } run_test 26b "sync mtime between ost and mds" +test_26c() { + multiop_bg_pause $DIR1/$tfile O_c || return 1 + MULTIPID=$! + echo + echo "--- set-in-past on opened file" + touch -m -d @978261179 $DIR2/$tfile + kill -USR1 $MULTIPID + wait $MULTIPID || error "wait for PID $MULTIPID failed" + stat $DIR1/$tfile | grep -e "File" -e "Modify" + stat $DIR2/$tfile | grep -e "File" -e "Modify" + + echo + echo "--- set-in-past on closed file" + touch -m -d @978261179 $DIR2/$tfile + stat $DIR1/$tfile | grep -e "File" -e "Modify" + stat $DIR2/$tfile | grep -e "File" -e "Modify" +} +run_test 26c "allow mtime to get older while file is open" + test_27() { cancel_lru_locks $OSC lctl clear