1#!/bin/sh
| 1#!/bin/sh
|
2# $FreeBSD: head/tools/regression/fstest/tests/rmdir/13.t 166065 2007-01-17 01:42:12Z pjd $
| 2# $FreeBSD: head/tools/regression/fstest/tests/rmdir/13.t 210984 2010-08-06 23:58:54Z pjd $
|
3 4desc="rmdir returns EBUSY if the directory to be removed is the mount point for a mounted file system" 5 6dir=`dirname $0` 7. ${dir}/../misc.sh 8
| 3 4desc="rmdir returns EBUSY if the directory to be removed is the mount point for a mounted file system" 5 6dir=`dirname $0` 7. ${dir}/../misc.sh 8
|
9case "${os}" in 10FreeBSD) 11 echo "1..3"
| 9[ "${os}" = "FreeBSD" ] || quick_exit
|
12
| 10
|
13 n0=`namegen`
| 11echo "1..3"
|
14
| 12
|
15 expect 0 mkdir ${n0} 0755 16 n=`mdconfig -a -n -t malloc -s 1m` 17 newfs /dev/md${n} >/dev/null 18 mount /dev/md${n} ${n0} 19 expect EBUSY rmdir ${n0} 20 umount /dev/md${n} 21 mdconfig -d -u ${n} 22 expect 0 rmdir ${n0} 23 ;; 24*) 25 quick_exit 26 ;; 27esac
| 13n0=`namegen` 14 15expect 0 mkdir ${n0} 0755 16n=`mdconfig -a -n -t malloc -s 1m` 17newfs /dev/md${n} >/dev/null 18mount /dev/md${n} ${n0} 19expect EBUSY rmdir ${n0} 20umount /dev/md${n} 21mdconfig -d -u ${n} 22expect 0 rmdir ${n0}
|
| |