mirror of
https://github.com/linux-apfs/apfstests.git
synced 2026-05-01 15:01:44 -07:00
Abort tests if a failure is encountered while creating/writing test files.
Merge of master-melb:xfs-cmds:29728a by kenmcd. Abort tests if a failure is encountered while creating/writing test files.
This commit is contained in:
@@ -42,6 +42,11 @@ while [ $i -lt 1000 ]
|
||||
do
|
||||
file=$SCRATCH_MNT/$i
|
||||
xfs_io -f -c "pwrite -b 64k -S 0xff 0 64k" $file > /dev/null
|
||||
if [ $? -ne 0 ]
|
||||
then
|
||||
echo error creating/writing file $file
|
||||
exit
|
||||
fi
|
||||
i=`expr $i + 1`
|
||||
done
|
||||
|
||||
|
||||
@@ -42,7 +42,17 @@ while [ $i -lt 1000 ]
|
||||
do
|
||||
file=$SCRATCH_MNT/$i
|
||||
xfs_io -f -c "pwrite -b 64k -S 0xff 0 64k" $file > /dev/null
|
||||
if [ $? -ne 0 ]
|
||||
then
|
||||
echo error creating/writing file $file
|
||||
exit
|
||||
fi
|
||||
xfs_io -c "truncate 64k" $file > /dev/null
|
||||
if [ $? -ne 0 ]
|
||||
then
|
||||
echo error truncating file $file
|
||||
exit
|
||||
fi
|
||||
i=`expr $i + 1`
|
||||
done
|
||||
|
||||
|
||||
@@ -42,7 +42,17 @@ while [ $i -lt 1000 ]
|
||||
do
|
||||
file=$SCRATCH_MNT/$i
|
||||
xfs_io -f -c "pwrite -b 64k -S 0xff 0 64k" $file > /dev/null
|
||||
xfs_io -f -c "truncate 32k" $file > /dev/null
|
||||
if [ $? -ne 0 ]
|
||||
then
|
||||
echo error creating/writing file $file
|
||||
exit
|
||||
fi
|
||||
xfs_io -c "truncate 32k" $file > /dev/null
|
||||
if [ $? -ne 0 ]
|
||||
then
|
||||
echo error truncating file $file
|
||||
exit
|
||||
fi
|
||||
i=`expr $i + 1`
|
||||
done
|
||||
|
||||
|
||||
@@ -42,7 +42,17 @@ while [ $i -lt 1000 ]
|
||||
do
|
||||
file=$SCRATCH_MNT/$i
|
||||
xfs_io -f -c "pwrite -b 32k -S 0xff 0 32k" $file > /dev/null
|
||||
xfs_io -f -c "truncate 64k" $file > /dev/null
|
||||
if [ $? -ne 0 ]
|
||||
then
|
||||
echo error creating/writing file $file
|
||||
exit
|
||||
fi
|
||||
xfs_io -c "truncate 64k" $file > /dev/null
|
||||
if [ $? -ne 0 ]
|
||||
then
|
||||
echo error truncating file $file
|
||||
exit
|
||||
fi
|
||||
i=`expr $i + 1`
|
||||
done
|
||||
|
||||
|
||||
@@ -73,6 +73,11 @@ while [ $i -lt 1000 ]
|
||||
do
|
||||
file=$SCRATCH_MNT/$i
|
||||
xfs_io -f -c "pwrite -b 32k -S 0xff 0 32k" -c "fsync" $file > /dev/null
|
||||
if [ $? -ne 0 ]
|
||||
then
|
||||
echo error creating/writing file $file
|
||||
exit
|
||||
fi
|
||||
i=`expr $i + 1`
|
||||
done
|
||||
|
||||
|
||||
Reference in New Issue
Block a user