4 desc
="truncate returns EROFS if the named file resides on a read-only file system"
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 expect
0 truncate
${n0}/${n1} 123
22 expect
123 stat
${n0}/${n1} size
24 expect EROFS truncate
${n0}/${n1} 1234
25 expect
123 stat
${n0}/${n1} size
27 expect
0 truncate
${n0}/${n1} 1234
28 expect
1234 stat
${n0}/${n1} size
29 expect
0 unlink
${n0}/${n1}