xfs/507: skip if we can't create a large sparse file for testing
authorDarrick J. Wong <darrick.wong@oracle.com>
Thu, 16 Jan 2020 05:10:54 +0000 (21:10 -0800)
committerEryu Guan <guaneryu@gmail.com>
Sun, 2 Feb 2020 12:46:58 +0000 (20:46 +0800)
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>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Eryu Guan <guaneryu@gmail.com>
tests/xfs/507

index 0bb697f9d2dbfcf38bd1548e650b48e35a6dbddc..fac5d243c8143d5175425b32e2d9514c1330116a 100755 (executable)
@@ -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