diff mbox series

[3/7] xfs/507: skip if we can't create a large sparse file for testing

Message ID 157915145418.2374854.11482414938923072334.stgit@magnolia
State Accepted
Headers show
Series fstests: random fixes | expand

Commit Message

Darrick J. Wong Jan. 16, 2020, 5:10 a.m. UTC
From: Darrick J. Wong <darrick.wong@oracle.com>

Skip this test we can't create the large sparse file needed to test
overflows.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
---
 tests/xfs/507 |    1 +
 1 file changed, 1 insertion(+)

Comments

Christoph Hellwig Jan. 16, 2020, 9:24 a.m. UTC | #1
On Wed, Jan 15, 2020 at 09:10:54PM -0800, Darrick J. Wong wrote:
> From: Darrick J. Wong <darrick.wong@oracle.com>
> 
> Skip this test we can't create the large sparse file needed to test
> overflows.

Looks good,

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

Patch

diff --git a/tests/xfs/507 b/tests/xfs/507
index 0bb697f9..fac5d243 100755
--- a/tests/xfs/507
+++ b/tests/xfs/507
@@ -68,6 +68,7 @@  _require_fs_space $SCRATCH_MNT 1234567
 loop_file=$SCRATCH_MNT/a.img
 loop_mount=$SCRATCH_MNT/a
 $XFS_IO_PROG -f -c "truncate $loop_file_sz" $loop_file
+test -s $loop_file || _notrun "Could not create large sparse file"
 loop_dev=$(_create_loop_device $loop_file)
 
 # Now we have to create the source file.  The goal is to overflow a 32-bit