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