xref: /freebsd/contrib/pjdfstest/tests/rmdir/00.t (revision 39ee7a7a6bdd1557b1c3532abf60d139798ac88b)
1#!/bin/sh
2# $FreeBSD: head/tools/regression/pjdfstest/tests/rmdir/00.t 211352 2010-08-15 21:24:17Z pjd $
3
4desc="rmdir removes directories"
5
6dir=`dirname $0`
7. ${dir}/../misc.sh
8
9echo "1..10"
10
11n0=`namegen`
12n1=`namegen`
13
14expect 0 mkdir ${n0} 0755
15expect dir lstat ${n0} type
16expect 0 rmdir ${n0}
17expect ENOENT lstat ${n0} type
18
19expect 0 mkdir ${n0} 0755
20expect 0 mkdir ${n0}/${n1} 0755
21time=`${fstest} stat ${n0} ctime`
22sleep 1
23expect 0 rmdir ${n0}/${n1}
24mtime=`${fstest} stat ${n0} mtime`
25test_check $time -lt $mtime
26ctime=`${fstest} stat ${n0} ctime`
27test_check $time -lt $ctime
28expect 0 rmdir ${n0}
29