allow more xfs_io tests to be generic

These tests just do generic reads & writes with xfs_io;
if we add a "-F" they will run on other filesystems.

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
This commit is contained in:
Eric Sandeen
2009-06-09 10:32:29 -05:00
parent aa31b54565
commit 67fbcc9c08
6 changed files with 60 additions and 60 deletions
+6 -6
View File
@@ -53,12 +53,12 @@ _show_wrote_and_stat_only()
. ./common.filter
# real QA test starts here
_supported_fs xfs
_supported_fs generic
_supported_os Linux
_require_scratch
_scratch_mkfs_xfs >>$seq.full 2>&1 \
_scratch_mkfs >>$seq.full 2>&1 \
|| _fail "mkfs scratch failed"
_scratch_mount >>$seq.full 2>&1 \
@@ -68,7 +68,7 @@ echo "# creating new file for io"
touch $SCRATCH_MNT/testfile
echo "# appending 15k to new file, sync every 5k"
xfs_io -a -c "pwrite 0 5k" -c "fsync" \
xfs_io -F -a -c "pwrite 0 5k" -c "fsync" \
-c "pwrite 5k 5k" -c "fsync" \
-c "pwrite 10k 5k" -c "fsync" -c "stat" \
$SCRATCH_MNT/testfile \
@@ -83,11 +83,11 @@ _scratch_mount >>$seq.full 2>&1 \
|| _fail "mount failed: $MOUNT_OPTIONS"
echo "# stating file to confirm correct size"
xfs_io -r -c "stat" $SCRATCH_MNT/testfile \
xfs_io -F -r -c "stat" $SCRATCH_MNT/testfile \
| _show_wrote_and_stat_only
echo "# appending 10 bytes to new file, sync at 5 bytes"
xfs_io -f -c "pwrite 0 5" -c s -c "pwrite 5 5" \
xfs_io -F -f -c "pwrite 0 5" -c s -c "pwrite 5 5" \
-c "stat" $SCRATCH_MNT/nextfile \
| _show_wrote_and_stat_only
@@ -100,7 +100,7 @@ _scratch_mount >>$seq.full 2>&1 \
|| _fail "mount failed: $MOUNT_OPTIONS"
echo "# stating file to confirm correct size"
xfs_io -r -c "stat" $SCRATCH_MNT/nextfile \
xfs_io -F -r -c "stat" $SCRATCH_MNT/nextfile \
| _show_wrote_and_stat_only
# success, all done