X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=blobdiff_plain;f=lustre%2Ftests%2Fsanity.sh;h=18ee71070b321b5da89662db1bf128cf574ee4a4;hp=ae7e8e9ba04f99f6cc3c63078b80c2ec80f39798;hb=4960810b94d808965cae9258fb4f7583618a75e9;hpb=7b9b7771af62c5c4f1f6dd40261183dd180eb74d;ds=sidebyside diff --git a/lustre/tests/sanity.sh b/lustre/tests/sanity.sh index ae7e8e9..18ee710 100755 --- a/lustre/tests/sanity.sh +++ b/lustre/tests/sanity.sh @@ -7706,6 +7706,23 @@ test_217() { # bug 22430 } run_test 217 "check lctl ping for hostnames with hiphen ('-')" +test_218() { + # do directio so as not to populate the page cache + log "creating a 10 Mb file" + multiop $DIR/$tfile oO_CREAT:O_DIRECT:O_RDWR:w$((10*1048576))c || error "multiop failed while creating a file" + log "starting reads" + dd if=$DIR/$tfile of=/dev/null bs=4096 & + log "truncating the file" + multiop $DIR/$tfile oO_TRUNC:c || error "multiop failed while truncating the file" + log "killing dd" + kill %+ || true # reads might have finished + echo "wait until dd is finished" + wait + log "removing the temporary file" + rm -rf $DIR/$tfile || error "tmp file removal failed" +} +run_test 218 "parallel read and truncate should not deadlock =======================" + # # tests that do cleanup/setup should be run at the end #