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:
Eric Sandeen
2013-05-14 08:33:44 -05:00
committed by Rich Johnston
parent 2941898570
commit 96fce07867
30 changed files with 142 additions and 138 deletions
+12 -12
View File
@@ -47,30 +47,30 @@ _supported_os Linux IRIX
_setup_testdir
echo "Buffered writer, buffered reader"
xfs_io -F -f -d -c 'pwrite -b 64k 0 512m' $testdir/io_test > /dev/null
xfs_io -F -f -c 'pwrite -b 64k 0 512m' $testdir/io_test >/dev/null &
xfs_io -F -c 'pread -b 64k 0 512m' $testdir/io_test > /dev/null
$XFS_IO_PROG -f -d -c 'pwrite -b 64k 0 512m' $testdir/io_test > /dev/null
$XFS_IO_PROG -f -c 'pwrite -b 64k 0 512m' $testdir/io_test >/dev/null &
$XFS_IO_PROG -c 'pread -b 64k 0 512m' $testdir/io_test > /dev/null
wait
rm $testdir/io_test
echo "Direct writer, buffered reader"
xfs_io -F -f -d -c 'pwrite -b 64k 0 512m' $testdir/io_test > /dev/null
xfs_io -F -f -d -c 'pwrite -b 64k 0 512m' $testdir/io_test >/dev/null &
xfs_io -F -c 'pread -b 64k 0 512m' $testdir/io_test > /dev/null
$XFS_IO_PROG -f -d -c 'pwrite -b 64k 0 512m' $testdir/io_test > /dev/null
$XFS_IO_PROG -f -d -c 'pwrite -b 64k 0 512m' $testdir/io_test >/dev/null &
$XFS_IO_PROG -c 'pread -b 64k 0 512m' $testdir/io_test > /dev/null
wait
rm $testdir/io_test
echo "Buffered writer, direct reader"
xfs_io -F -f -d -c 'pwrite -b 64k 0 512m' $testdir/io_test > /dev/null
xfs_io -F -f -c 'pwrite -b 64k 0 512m' $testdir/io_test >/dev/null &
xfs_io -F -d -c 'pread -b 64k 0 512m' $testdir/io_test > /dev/null
$XFS_IO_PROG -f -d -c 'pwrite -b 64k 0 512m' $testdir/io_test > /dev/null
$XFS_IO_PROG -f -c 'pwrite -b 64k 0 512m' $testdir/io_test >/dev/null &
$XFS_IO_PROG -d -c 'pread -b 64k 0 512m' $testdir/io_test > /dev/null
wait
rm $testdir/io_test
echo "Direct writer, direct reader"
xfs_io -F -f -d -c 'pwrite -b 64k 0 512m' $testdir/io_test > /dev/null
xfs_io -F -f -d -c 'pwrite -b 64k 0 512m' $testdir/io_test >/dev/null &
xfs_io -F -d -c 'pread -b 64k 0 512m' $testdir/io_test > /dev/null
$XFS_IO_PROG -f -d -c 'pwrite -b 64k 0 512m' $testdir/io_test > /dev/null
$XFS_IO_PROG -f -d -c 'pwrite -b 64k 0 512m' $testdir/io_test >/dev/null &
$XFS_IO_PROG -d -c 'pread -b 64k 0 512m' $testdir/io_test > /dev/null
wait
rm $testdir/io_test