generic/270: Check for scratch mount success
authorAndreas Gruenbacher <agruenba@redhat.com>
Sat, 3 Feb 2018 18:57:37 +0000 (19:57 +0100)
committerEryu Guan <eguan@redhat.com>
Mon, 5 Feb 2018 10:01:15 +0000 (18:01 +0800)
We don't want to fill up the scratch mount point if the scratch
mount fails.

Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
Reviewed-by: Eryu Guan <eguan@redhat.com>
Signed-off-by: Eryu Guan <eguan@redhat.com>
tests/generic/270

index f5026ba0cd300b2f8b2e722bea3ac363eccc918e..318f532ae9c00a6e7f187718bb1d70da62139f73 100755 (executable)
@@ -83,7 +83,7 @@ _require_command "$KILLALL_PROG" killall
 
 rm -f $seqres.full
 _scratch_mkfs_sized $((512 * 1024 * 1024)) >> $seqres.full 2>&1
-_scratch_mount "-o usrquota,grpquota"
+_scratch_mount "-o usrquota,grpquota" || _fail "mount failed"
 chmod 777 $SCRATCH_MNT
 quotacheck -u -g $SCRATCH_MNT 2>/dev/null
 quotaon -u -g $SCRATCH_MNT 2>/dev/null