aboutsummaryrefslogtreecommitdiff
path: root/tools/regression/pjdfstest/tests/unlink/03.t
diff options
context:
space:
mode:
Diffstat (limited to 'tools/regression/pjdfstest/tests/unlink/03.t')
-rw-r--r--tools/regression/pjdfstest/tests/unlink/03.t21
1 files changed, 21 insertions, 0 deletions
diff --git a/tools/regression/pjdfstest/tests/unlink/03.t b/tools/regression/pjdfstest/tests/unlink/03.t
new file mode 100644
index 000000000000..db4b4a49c9f3
--- /dev/null
+++ b/tools/regression/pjdfstest/tests/unlink/03.t
@@ -0,0 +1,21 @@
+#!/bin/sh
+# $FreeBSD$
+
+desc="unlink returns ENAMETOOLONG if an entire path name exceeded {PATH_MAX} characters"
+
+dir=`dirname $0`
+. ${dir}/../misc.sh
+
+echo "1..4"
+
+nx=`dirgen_max`
+nxx="${nx}x"
+
+mkdir -p "${nx%/*}"
+
+expect 0 create ${nx} 0644
+expect 0 unlink ${nx}
+expect ENOENT unlink ${nx}
+expect ENAMETOOLONG unlink ${nxx}
+
+rm -rf "${nx%%/*}"