mirror of
https://github.com/linux-apfs/apfstests.git
synced 2026-05-01 15:01:44 -07:00
fstests: fix call sites that used xfs_io directly
Convert those few remaining call sites to use the XFS_IO_PROG env var. Signed-off-by: Amir Goldstein <amir73il@gmail.com> Reviewed-by: Eryu Guan <eguan@redhat.com> Signed-off-by: Eryu Guan <eguan@redhat.com>
This commit is contained in:
committed by
Eryu Guan
parent
16ef0843f2
commit
3fcfdba403
+2
-2
@@ -50,7 +50,7 @@ populate()
|
||||
i=0
|
||||
while [ $i -le $files -a "X$faststart" = "X" ]; do
|
||||
file=$SCRATCH_MNT/f$i
|
||||
xfs_io -f -d -c 'pwrite -b 64k 0 64k' $file >/dev/null
|
||||
$XFS_IO_PROG -f -d -c 'pwrite -b 64k 0 64k' $file >/dev/null
|
||||
let i=$i+1
|
||||
done
|
||||
|
||||
@@ -77,7 +77,7 @@ allocate()
|
||||
{
|
||||
j=0
|
||||
while [ $j -lt 100 ]; do
|
||||
xfs_io -f -c 'pwrite -b 64k 0 16m' $file \
|
||||
$XFS_IO_PROG -f -c 'pwrite -b 64k 0 16m' $file \
|
||||
>/dev/null 2>&1
|
||||
rm $file
|
||||
let j=$j+1
|
||||
|
||||
+2
-2
@@ -44,7 +44,7 @@ _check_paths()
|
||||
sync; sleep 1
|
||||
echo ""
|
||||
echo "Check parent"
|
||||
if ! xfs_io -x -c 'parent -c' $SCRATCH_MNT | _filter_num; then
|
||||
if ! $XFS_IO_PROG -x -c 'parent -c' $SCRATCH_MNT | _filter_num; then
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
@@ -55,7 +55,7 @@ _print_names()
|
||||
echo "Print out hardlink names for given path, $1"
|
||||
echo ""
|
||||
|
||||
xfs_io -x -c parent $1 | awk '/p_ino.*=/ {$3 = "inodeXXX"; print; next} {print}'
|
||||
$XFS_IO_PROG -x -c parent $1 | awk '/p_ino.*=/ {$3 = "inodeXXX"; print; next} {print}'
|
||||
}
|
||||
|
||||
_test_create()
|
||||
|
||||
+2
-2
@@ -62,8 +62,8 @@ dd if=/dev/zero of=$SCRATCH_MNT/$filename bs=1024k count=10 >> $seqres.full 2>&1
|
||||
echo Punching holes in file
|
||||
echo Punching holes in file >> $seqres.full
|
||||
for i in $holes ; do
|
||||
echo xfs_io -c "unresvsp `echo $i |$SED_PROG 's/:/ /g'`" $SCRATCH_MNT/$filename >> $seqres.full
|
||||
xfs_io -c "unresvsp `echo $i |$SED_PROG 's/:/ /g'`" $SCRATCH_MNT/$filename ;
|
||||
echo $XFS_IO_PROG -c "unresvsp `echo $i |$SED_PROG 's/:/ /g'`" $SCRATCH_MNT/$filename >> $seqres.full
|
||||
$XFS_IO_PROG -c "unresvsp `echo $i |$SED_PROG 's/:/ /g'`" $SCRATCH_MNT/$filename ;
|
||||
done
|
||||
|
||||
echo Verifying holes are in the correct spots:
|
||||
|
||||
+1
-1
@@ -56,7 +56,7 @@ do_pwrite()
|
||||
end=`expr $2 \* $min_align`
|
||||
length=`expr $end - $offset`
|
||||
|
||||
xfs_io -d -f $file -c "pwrite $offset $length" >/dev/null
|
||||
$XFS_IO_PROG -d -f $file -c "pwrite $offset $length" >/dev/null
|
||||
}
|
||||
|
||||
_require_scratch
|
||||
|
||||
+1
-1
@@ -60,7 +60,7 @@ EXTSIZE="256k"
|
||||
mkdir ${TDIR}
|
||||
|
||||
# Set the test directory extsize
|
||||
xfs_io -c "extsize ${EXTSIZE}" ${TDIR}
|
||||
$XFS_IO_PROG -c "extsize ${EXTSIZE}" ${TDIR}
|
||||
|
||||
# Create a set of holey files
|
||||
echo "generating ${NFILES} files"
|
||||
|
||||
+1
-1
@@ -81,7 +81,7 @@ _test_loop()
|
||||
mount -t xfs -o loop $LOOP_DEV $LOOP_MNT
|
||||
|
||||
echo "*** preallocate large file"
|
||||
xfs_io -f -c "resvsp 0 $fsize" $LOOP_MNT/foo | _filter_io
|
||||
$XFS_IO_PROG -f -c "resvsp 0 $fsize" $LOOP_MNT/foo | _filter_io
|
||||
|
||||
echo "*** unmount loop filesystem"
|
||||
umount $LOOP_MNT > /dev/null 2>&1
|
||||
|
||||
+1
-1
@@ -69,7 +69,7 @@ done
|
||||
sync
|
||||
|
||||
# Soak up any remaining freespace
|
||||
xfs_io -f -c "pwrite 0 16m" -c "fsync" $SCRATCH_MNT/space_file.large >> $seqres.full 2>&1
|
||||
$XFS_IO_PROG -f -c "pwrite 0 16m" -c "fsync" $SCRATCH_MNT/space_file.large >> $seqres.full 2>&1
|
||||
|
||||
# Take a look at freespace for any post-mortem on the test
|
||||
_scratch_unmount
|
||||
|
||||
Reference in New Issue
Block a user