diff options
Diffstat (limited to 'tools/regression/fstest/tests/unlink/08.t')
-rw-r--r-- | tools/regression/fstest/tests/unlink/08.t | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/tools/regression/fstest/tests/unlink/08.t b/tools/regression/fstest/tests/unlink/08.t new file mode 100644 index 0000000..5b0f03b --- /dev/null +++ b/tools/regression/fstest/tests/unlink/08.t @@ -0,0 +1,23 @@ +#!/bin/sh +# $FreeBSD$ + +desc="unlink returns EPERM if the named file is a directory" + +dir=`dirname $0` +. ${dir}/../misc.sh + +echo "1..3" + +n0=`namegen` + +expect 0 mkdir ${n0} 0755 +case "${os}:${fs}" in +SunOS:UFS) + expect 0 unlink ${n0} + expect ENOENT rmdir ${n0} + ;; +*) + expect EPERM unlink ${n0} + expect 0 rmdir ${n0} + ;; +esac |