X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=blobdiff_plain;f=lustre%2Ftests%2Fsanityn.sh;h=0e8cdd5a26b12b1e28703bd47a54b032951f617f;hp=ec00a5e6001cedb069a086dcc7424fea31c5203b;hb=ca754ec8b43416d41bbd401bad7d9f93746fb867;hpb=910ed44d1f3844ae3f76a3594dbd1a09b5892643 diff --git a/lustre/tests/sanityn.sh b/lustre/tests/sanityn.sh index ec00a5e..0e8cdd5 100755 --- a/lustre/tests/sanityn.sh +++ b/lustre/tests/sanityn.sh @@ -753,7 +753,7 @@ test_27() { lctl clear dd if=/dev/zero of=$DIR2/$tfile bs=$((4096+4))k conv=notrunc count=4 seek=3 & DD2_PID=$! - usleep 50 + sleep 0.5 log "dd 1 started" dd if=/dev/zero of=$DIR1/$tfile bs=$((16384-1024))k conv=notrunc count=1 seek=4 & @@ -2932,10 +2932,10 @@ test_51b() { # delay glimpse so that layout has changed when glimpse finish #define OBD_FAIL_GLIMPSE_DELAY 0x1404 - $LCTL set_param fail_loc=0x1404 + $LCTL set_param fail_loc=0x1404 fail_val=4 stat -c %s $DIR2/$tfile |tee $tmpfile & local pid=$! - sleep 1 + sleep 0.2 # extend layout of testing file dd if=/dev/zero of=$DIR1/$tfile bs=1M count=1 seek=2 conv=notrunc || @@ -5295,6 +5295,30 @@ test_106c() { } run_test 106c "Verify statx attributes mask" +test_107() { # LU-1031 + dd if=/dev/zero of=$DIR1/$tfile bs=1M count=10 + local gid1=14091995 + local gid2=16022000 + + $LFS getstripe $DIR1/$tfile + + multiop_bg_pause $DIR1/$tfile OG${gid1}_g${gid1}c || return 1 + local MULTIPID1=$! + multiop_bg_pause $DIR2/$tfile O_G${gid2}r10g${gid2}c || return 2 + local MULTIPID2=$! + kill -USR1 $MULTIPID2 + sleep 2 + if [[ `ps h -o comm -p $MULTIPID2` == "" ]]; then + error "First grouplock does not block second one" + else + echo "First grouplock blocks second one" + fi + kill -USR1 $MULTIPID1 + wait $MULTIPID1 + wait $MULTIPID2 +} +run_test 107 "Basic grouplock conflict" + log "cleanup: ======================================================" # kill and wait in each test only guarentee script finish, but command in script