summaryrefslogtreecommitdiff
path: root/tests/open/14.t
diff options
context:
space:
mode:
Diffstat (limited to 'tests/open/14.t')
-rw-r--r--tests/open/14.t9
1 files changed, 5 insertions, 4 deletions
diff --git a/tests/open/14.t b/tests/open/14.t
index a9c637f4cc0de..9e085d6d88cef 100644
--- a/tests/open/14.t
+++ b/tests/open/14.t
@@ -1,4 +1,5 @@
#!/bin/sh
+# vim: filetype=sh noexpandtab ts=8 sw=8
# $FreeBSD: head/tools/regression/pjdfstest/tests/open/14.t 211352 2010-08-15 21:24:17Z pjd $
desc="open returns EROFS if the named file resides on a read-only file system, and the file is to be modified"
@@ -14,9 +15,9 @@ n0=`namegen`
n1=`namegen`
expect 0 mkdir ${n0} 0755
-n=`mdconfig -a -n -t malloc -s 1m`
-newfs /dev/md${n} >/dev/null
-mount /dev/md${n} ${n0}
+n=`mdconfig -a -n -t malloc -s 1m` || exit
+newfs /dev/md${n} >/dev/null || exit
+mount /dev/md${n} ${n0} || exit
expect 0 create ${n0}/${n1} 0644
expect 0 open ${n0}/${n1} O_WRONLY
expect 0 open ${n0}/${n1} O_RDWR
@@ -28,5 +29,5 @@ expect EROFS open ${n0}/${n1} O_RDONLY,O_TRUNC
mount -uw /dev/md${n}
expect 0 unlink ${n0}/${n1}
umount /dev/md${n}
-mdconfig -d -u ${n}
+mdconfig -d -u ${n} || exit
expect 0 rmdir ${n0}