[1/4] xfs/196: check for delalloc blocks after pwrite
diff mbox series

Message ID 157049659135.2397321.4055705884999858018.stgit@magnolia
State New
Headers show
Series
  • fstests: random fixes
Related show

Commit Message

Darrick J. Wong Oct. 8, 2019, 1:03 a.m. UTC
From: Darrick J. Wong <darrick.wong@oracle.com>

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 <darrick.wong@oracle.com>
---
 tests/xfs/196 |    2 ++
 1 file changed, 2 insertions(+)

Comments

Christoph Hellwig Oct. 8, 2019, 7:01 a.m. UTC | #1
On Mon, Oct 07, 2019 at 06:03:11PM -0700, Darrick J. Wong wrote:
> From: Darrick J. Wong <darrick.wong@oracle.com>
> 
> 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 <darrick.wong@oracle.com>

Looks good,

Reviewed-by: Christoph Hellwig <hch@lst.de>

Patch
diff mbox series

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