mirror of
https://github.com/linux-apfs/apfstests.git
synced 2026-05-01 15:01:44 -07:00
xfstests: automatically add -F to xfs_io on non-xfs
The -F flag to xfs_io originally enabled it to operate on non-xfs filesystems. This restriction was removed upstream in favor of gracefully failing on the handful of operations that actually required xfs, and the option was deprecated. However, xfstests is still used on distros with older xfsprogs, and so "xfs_io -F" was necessary throughout xfstests. Simplify this by appending -F to XFS_IO_PROG when it's needed - i.e. if we're using old xfsprogs on a non-xfs filesystem. This will eliminate errors when new tests leave out the -F, and if and when -F is finally removed, there will be one central location in xfstests to update. Signed-off-by: Eric Sandeen <sandeen@redhat.com> Acked-by: Dave Chinner <dchinner@redhat.com> Reviewed-by: Rich Johnston <rjohnston@sgi.com> Signed-off-by: Rich Johnston <rjohnston@sgi.com>
This commit is contained in:
committed by
Rich Johnston
parent
2941898570
commit
96fce07867
+6
-6
@@ -64,18 +64,18 @@ _umount_mount
|
||||
cd $SCRATCH_MNT
|
||||
|
||||
# create file with async I/O
|
||||
xfs_io -F -f -c 'pwrite -b 4k -S 0x12 0 4k' async_file > /dev/null
|
||||
$XFS_IO_PROG -f -c 'pwrite -b 4k -S 0x12 0 4k' async_file > /dev/null
|
||||
|
||||
# create file with sync I/O
|
||||
xfs_io -F -f -s -c 'pwrite -b 4k -S 0x34 0 4k' sync_file > /dev/null
|
||||
$XFS_IO_PROG -f -s -c 'pwrite -b 4k -S 0x34 0 4k' sync_file > /dev/null
|
||||
|
||||
# create file with sync I/O
|
||||
xfs_io -F -f -d -c 'pwrite -b 4k -S 0x56 0 4k' direct_file > /dev/null
|
||||
$XFS_IO_PROG -f -d -c 'pwrite -b 4k -S 0x56 0 4k' direct_file > /dev/null
|
||||
|
||||
# create file, truncate and then dirty again
|
||||
xfs_io -F -f -c 'pwrite -b 4k -S 0x78 0 4k' trunc_file > /dev/null
|
||||
xfs_io -F -f -c 'truncate 2k' trunc_file > /dev/null
|
||||
xfs_io -F -c 'pwrite 1k 0 1k' trunc_file > /dev/null
|
||||
$XFS_IO_PROG -f -c 'pwrite -b 4k -S 0x78 0 4k' trunc_file > /dev/null
|
||||
$XFS_IO_PROG -f -c 'truncate 2k' trunc_file > /dev/null
|
||||
$XFS_IO_PROG -c 'pwrite 1k 0 1k' trunc_file > /dev/null
|
||||
|
||||
_umount_mount
|
||||
|
||||
|
||||
Reference in New Issue
Block a user