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:
Lachlan McIlroy
2007-09-20 06:13:02 +00:00
parent f58c8364be
commit 2659a01a6b
6 changed files with 47 additions and 2 deletions
+5
View File
@@ -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
+10
View File
@@ -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
+11 -1
View File
@@ -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
+11 -1
View File
@@ -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
+5
View File
@@ -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
+5
View File
@@ -73,6 +73,11 @@ while [ $i -lt 1000 ]
do
file=$SCRATCH_MNT/$i
xfs_io -f -c "pwrite -b 64k -S 0xff 0 10m" $file > /dev/null
if [ $? -ne 0 ]
then
echo error creating/writing file $file
exit
fi
i=`expr $i + 1`
done