1#!/bin/sh 2# $FreeBSD: head/tools/regression/pjdfstest/tests/rmdir/13.t 211352 2010-08-15 21:24:17Z 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 9[ "${os}" = "FreeBSD" ] || quick_exit 10 11echo "1..3" 12 13n0=`namegen` 14 15expect 0 mkdir ${n0} 0755 16n=`mdconfig -a -n -t malloc -s 1m` || exit 17newfs /dev/md${n} >/dev/null || exit 18mount /dev/md${n} ${n0} || exit 19expect EBUSY rmdir ${n0} 20umount /dev/md${n} 21mdconfig -d -u ${n} || exit 22expect 0 rmdir ${n0} 23