[PATCH] xfstests: exit out if _scratch_mount fails

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I test some of the different mkfs options for btrfs, one set doesn't work
properly with small file systems, so the fs won't mount.  This is fine from a
btrfs point of view, but tests that fail to mount the scratch fs will run
anyway, so if it's a "fill the fs" sort of test this will wreak havoc.  To fix
this just error out of _scratch_mount fails.  Thanks,

Signed-off-by: Josef Bacik <jbacik@xxxxxxxxxxxx>
---
 common/rc |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/common/rc b/common/rc
index 4de1329..f11699f 100644
--- a/common/rc
+++ b/common/rc
@@ -276,6 +276,10 @@ _scratch_mount_options()
 _scratch_mount()
 {
     _mount -t $FSTYP `_scratch_mount_options $*`
+    if [ $? -ne 0 ]; then
+	echo "mount failed"
+	exit 1
+    fi
 }
 
 _scratch_unmount()
-- 
1.7.7.6

_______________________________________________
xfs mailing list
xfs@xxxxxxxxxxx
http://oss.sgi.com/mailman/listinfo/xfs




[Index of Archives]     [Linux XFS Devel]     [Linux Filesystem Development]     [Filesystem Testing]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux