mirror of
https://github.com/linux-apfs/apfstests.git
synced 2026-05-01 15:01:44 -07:00
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:
committed by
Eryu Guan
parent
bf5a5da572
commit
ed6e4664ee
+6
-6
@@ -63,7 +63,7 @@ _supported_os Linux
|
||||
_require_test_reflink
|
||||
_require_test_lsattr
|
||||
_require_cp_reflink
|
||||
_require_xfs_io_command "falloc"
|
||||
_require_xfs_io_command "funshare"
|
||||
|
||||
rm -f $seqres.full
|
||||
|
||||
@@ -90,18 +90,18 @@ _test_cycle_mount
|
||||
free_blocks1=$(stat -f $testdir -c '%f')
|
||||
|
||||
echo "funshare part of a file"
|
||||
$XFS_IO_PROG -f -c "falloc 0 $((sz / 2))" $testdir/file2
|
||||
$XFS_IO_PROG -f -c "funshare 0 $((sz / 2))" $testdir/file2
|
||||
_test_cycle_mount
|
||||
|
||||
echo "funshare some of the copies"
|
||||
$XFS_IO_PROG -f -c "falloc 0 $sz" $testdir/file2
|
||||
$XFS_IO_PROG -f -c "falloc 0 $sz" $testdir/file3
|
||||
$XFS_IO_PROG -f -c "funshare 0 $sz" $testdir/file2
|
||||
$XFS_IO_PROG -f -c "funshare 0 $sz" $testdir/file3
|
||||
_test_cycle_mount
|
||||
free_blocks2=$(stat -f $testdir -c '%f')
|
||||
|
||||
echo "funshare the rest of the files"
|
||||
$XFS_IO_PROG -f -c "falloc 0 $sz" $testdir/file4
|
||||
$XFS_IO_PROG -f -c "falloc 0 $sz" $testdir/file1
|
||||
$XFS_IO_PROG -f -c "funshare 0 $sz" $testdir/file4
|
||||
$XFS_IO_PROG -f -c "funshare 0 $sz" $testdir/file1
|
||||
_test_cycle_mount
|
||||
free_blocks3=$(stat -f $testdir -c '%f')
|
||||
|
||||
|
||||
Reference in New Issue
Block a user