Merge of master-melb:xfs-cmds:29728a by kenmcd.
Abort tests if a failure is encountered while creating/writing test files.
do
file=$SCRATCH_MNT/$i
xfs_io -f -c "pwrite -b 64k -S 0xff 0 64k" $file > /dev/null
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
do
file=$SCRATCH_MNT/$i
xfs_io -f -c "pwrite -b 64k -S 0xff 0 64k" $file > /dev/null
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
xfs_io -c "truncate 64k" $file > /dev/null
+ if [ $? -ne 0 ]
+ then
+ echo error truncating file $file
+ exit
+ fi
do
file=$SCRATCH_MNT/$i
xfs_io -f -c "pwrite -b 64k -S 0xff 0 64k" $file > /dev/null
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
do
file=$SCRATCH_MNT/$i
xfs_io -f -c "pwrite -b 32k -S 0xff 0 32k" $file > /dev/null
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
do
file=$SCRATCH_MNT/$i
xfs_io -f -c "pwrite -b 32k -S 0xff 0 32k" -c "fsync" $file > /dev/null
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
do
file=$SCRATCH_MNT/$i
xfs_io -f -c "pwrite -b 64k -S 0xff 0 10m" $file > /dev/null
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