1#!/bin/sh
2# $FreeBSD: src/tools/regression/fstest/tests/rmdir/13.t,v 1.1 2007/01/17 01:42:11 pjd Exp $
3
4desc="rmdir returns EBUSY if the directory to be removed is the mount point for a mounted file system"
5
6n0=`namegen`
7
8expect 0 mkdir ${n0} 0755
9dd if=/dev/zero of=tmpdisk bs=1k count=1024 status=none
10vnconfig vnd1 tmpdisk
11newfs /dev/rvnd1c >/dev/null
12mount /dev/vnd1c ${n0}
13expect EBUSY rmdir ${n0}
14umount /dev/vnd1c
15vnconfig -u vnd1
16rm tmpdisk
17expect 0 rmdir ${n0}
18