1#!/bin/sh 2# $FreeBSD: src/tools/regression/fstest/tests/rmdir/14.t,v 1.1 2007/01/17 01:42:11 pjd Exp $ 3 4desc="rmdir returns EROFS if the named file resides on a read-only file system" 5 6n0=`namegen` 7n1=`namegen` 8 9expect 0 mkdir ${n0} 0755 10dd if=/dev/zero of=tmpdisk bs=1k count=1024 status=none 11vnconfig vnd1 tmpdisk 12newfs /dev/rvnd1c >/dev/null 13mount /dev/vnd1c ${n0} 14expect 0 mkdir ${n0}/${n1} 0755 15mount -ur /dev/vnd1c 16expect EROFS rmdir ${n0}/${n1} 17mount -uw /dev/vnd1c 18expect 0 rmdir ${n0}/${n1} 19umount /dev/vnd1c 20vnconfig -u vnd1 21rm tmpdisk 22expect 0 rmdir ${n0} 23