From 2659a01a6b6f81b08f75593b5c1f7a7ea179ba5f Mon Sep 17 00:00:00 2001 From: Lachlan McIlroy Date: Thu, 20 Sep 2007 06:13:02 +0000 Subject: [PATCH] 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. --- 137 | 5 +++++ 138 | 10 ++++++++++ 139 | 12 +++++++++++- 140 | 12 +++++++++++- 179 | 5 +++++ 180 | 5 +++++ 6 files changed, 47 insertions(+), 2 deletions(-) diff --git a/137 b/137 index a1caed3e..7e6340a0 100755 --- a/137 +++ b/137 @@ -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 diff --git a/138 b/138 index 282ba5d7..eb3a57a5 100755 --- a/138 +++ b/138 @@ -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 diff --git a/139 b/139 index ed1d6b93..24a4417e 100755 --- a/139 +++ b/139 @@ -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 diff --git a/140 b/140 index ac015209..91479660 100755 --- a/140 +++ b/140 @@ -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 diff --git a/179 b/179 index 3a285ece..ac0bbd58 100644 --- a/179 +++ b/179 @@ -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 diff --git a/180 b/180 index 5af603e6..20b174a7 100644 --- a/180 +++ b/180 @@ -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 -- 2.30.2