turns printfs back on
[freebsd-src/fkvm-freebsd.git] / tools / regression / fstest / tests / unlink / 12.t
blob65a3aaff5cb1a795fc34d0d0cb788ad9ff1d7a98
1 #!/bin/sh
2 # $FreeBSD$
4 desc="unlink returns EROFS if the named file resides on a read-only file system"
6 dir=`dirname $0`
7 . ${dir}/../misc.sh
9 case "${os}:${fs}" in
10 FreeBSD:UFS)
11 echo "1..5"
13 n0=`namegen`
14 n1=`namegen`
16 expect 0 mkdir ${n0} 0755
17 n=`mdconfig -a -n -t malloc -s 1m`
18 newfs /dev/md${n} >/dev/null
19 mount /dev/md${n} ${n0}
20 expect 0 create ${n0}/${n1} 0644
21 mount -ur /dev/md${n}
22 expect EROFS unlink ${n0}/${n1}
23 mount -uw /dev/md${n}
24 expect 0 unlink ${n0}/${n1}
25 umount /dev/md${n}
26 mdconfig -d -u ${n}
27 expect 0 rmdir ${n0}
30 quick_exit
32 esac