X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=blobdiff_plain;f=lustre%2Ftests%2Fsanity.sh;h=715a35f43db99f0a1dd2bc6c3859282f4c09b2f0;hp=4fc5ac25176b9c9c6d74a5d36a1f85147e7cf905;hb=6e985684b822324143c686e919fe7a75bb16b440;hpb=1a5fdde76ed95743f2d7df5159b075b3ef5af68a;ds=sidebyside diff --git a/lustre/tests/sanity.sh b/lustre/tests/sanity.sh index 4fc5ac2..715a35f 100755 --- a/lustre/tests/sanity.sh +++ b/lustre/tests/sanity.sh @@ -16227,6 +16227,39 @@ test_271c() { } run_test 271c "DoM: IO lock at open saves enqueue RPCs" +test_275() { + remote_ost_nodsh && skip "remote OST with nodsh" && return + [ $(lustre_version_code ost1) -lt $(version_code 2.10.57) ] && + skip "Need OST version >= 2.10.57" && return 0 + + local file=$DIR/$tfile + local oss + + oss=$(comma_list $(osts_nodes)) + + dd if=/dev/urandom of=$file bs=1M count=2 || + error "failed to create a file" + cancel_lru_locks osc + + #lock 1 + dd if=$file of=/dev/null bs=1M count=1 iflag=direct || + error "failed to read a file" + +#define OBD_FAIL_LDLM_PAUSE_CANCEL2 0x31f + $LCTL set_param fail_loc=0x8000031f + + cancel_lru_locks osc & + sleep 1 + +#define OBD_FAIL_LDLM_PROLONG_PAUSE 0x32b + do_nodes $oss $LCTL set_param fail_loc=0x8000032b + #IO takes another lock, but matches the PENDING one + #and places it to the IO RPC + dd if=$file of=/dev/null bs=1M count=1 iflag=direct || + error "failed to read a file with PENDING lock" +} +run_test 275 "Read on a canceled duplicate lock" + test_276() { remote_ost_nodsh && skip "remote OST with nodsh" && return local pid