X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=blobdiff_plain;f=lustre%2Ftests%2Fsanityn.sh;h=442b6e2082aea598ddff9472dd9c458bf689fd70;hp=58081b42e1d02e77a5abbfed1b752799d3ec16e5;hb=cda353e6efae5013a26aedbe49d8aa6fb8fe456e;hpb=6d5fe29066af5f8e40055fd89b285853c363e947;ds=sidebyside diff --git a/lustre/tests/sanityn.sh b/lustre/tests/sanityn.sh index 58081b4..442b6e2 100755 --- a/lustre/tests/sanityn.sh +++ b/lustre/tests/sanityn.sh @@ -5367,6 +5367,33 @@ test_107b() { } run_test 107b "Grouplock is added to the head of waiting list" +test_108a() { + local offset + + $LFS setstripe -E 1M -c 1 -E -1 $DIR1/$tfile || + error "Create $DIR1/$tfile failed" + + dd if=/dev/zero of=$DIR1/$tfile bs=10000 count=1 || + error "dd $DIR1/$tfile failed" + offset=$(lseek_test -d 5000 $DIR2/$tfile) + [[ $offset == 5000 ]] || error "offset $offset != 5000" + + $TRUNCATE $DIR1/$tfile 2000 + offset=$(lseek_test -l 1000 $DIR2/$tfile) + [[ $offset == 2000 ]] || error "offset $offset != 2000" + + #define OBD_FAIL_OSC_DELAY_IO 0x414 + $LCTL set_param fail_val=4 fail_loc=0x80000414 + dd if=/dev/zero of=$DIR1/$tfile count=1 bs=8M conv=notrunc oflag=dsync & + local pid=$! + sleep 2 + + offset=$(lseek_test -l 8000 $DIR2/$tfile) + wait $pid + [[ $offset == 8388608 ]] || error "offset $offset != 8388608" +} +run_test 108a "lseek: parallel updates" + log "cleanup: ======================================================" # kill and wait in each test only guarentee script finish, but command in script