From: Darrick J. Wong Date: Tue, 8 Oct 2019 01:03:11 +0000 (-0700) Subject: xfs/196: check for delalloc blocks after pwrite X-Git-Tag: v2022.05.01~1002 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=5b2232dde59d435a6e32b9bf6c2b5309e75893d3;p=xfstests-dev.git xfs/196: check for delalloc blocks after pwrite This test depends on the pwrite creating delalloc blocks, which doesn't happen if the scratch fs is mounted in dax mode (or has an extent size hint applied). Therefore, check for delalloc blocks and _notrun if we didn't get any. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig Signed-off-by: Eryu Guan --- diff --git a/tests/xfs/196 b/tests/xfs/196 index 5dc28670..406146c5 100755 --- a/tests/xfs/196 +++ b/tests/xfs/196 @@ -50,6 +50,8 @@ bytes=$((64 * 1024)) # create sequential delayed allocation $XFS_IO_PROG -f -c "pwrite 0 $bytes" $file >> $seqres.full 2>&1 +$XFS_IO_PROG -c "bmap -elpv" $file | grep -q delalloc || \ + _notrun "Unable to create delayed allocations" # Enable write drops. All buffered writes are dropped from this point on. _scratch_inject_error "drop_writes" 1