fstests: fix fallocate commands that need the unshare switch

We re-added the UNSHARE flag to fallocate, so go make sure that all
the unshare tests actually check that the installed copy of xfs_io
supports the 'funshare' command and that the underlying filesystem
understands the flag, and change the tests themselves to use
funshare.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Eryu Guan <eguan@redhat.com>
This commit is contained in:
Darrick J. Wong
2016-10-17 15:09:28 -07:00
committed by Eryu Guan
parent bf5a5da572
commit ed6e4664ee
12 changed files with 31 additions and 27 deletions
+2 -1
View File
@@ -51,6 +51,7 @@ _require_scratch_reflink
_require_cp_reflink
_require_fiemap
_require_xfs_io_command "cowextsize"
_require_xfs_io_command "funshare"
_require_odirect
rm -f $seqres.full
@@ -85,7 +86,7 @@ md5sum $testdir/file2 | _filter_scratch
echo "CoW and unmount"
$XFS_IO_PROG -f -c "cowextsize" $testdir/file2 >> $seqres.full
$XFS_IO_PROG -d -f -c "pwrite -R -S 0x63 -b $real_blksz 0 $filesize" $testdir/file2 >> $seqres.full
$XFS_IO_PROG -d -f -c "falloc -u 0 $filesize" $testdir/file2 >> $seqres.full
$XFS_IO_PROG -d -f -c "funshare 0 $filesize" $testdir/file2 >> $seqres.full
_scratch_cycle_mount
echo "Compare files"