aboutsummaryrefslogtreecommitdiff
path: root/tests/link/02.t
diff options
context:
space:
mode:
authorEnji Cooper <ngie@FreeBSD.org>2014-09-09 02:50:09 +0000
committerEnji Cooper <ngie@FreeBSD.org>2014-09-09 02:50:09 +0000
commit9a56205fc912cc30c498cd8ab536eef96373b16f (patch)
treebd5f561604ac7481d7b8cdb06fb9cc3ba6e1512d /tests/link/02.t
This vendor import code was obtained from https://github.com/pjd/pjdfstest/commit/abf03c3a47745d4521b0e4aa141317553ca48f91 Approved by: rpaulo (mentor) Phabric: D743 Sponsored by: EMC / Isilon Storage Division
Notes
Notes: svn path=/vendor/pjdfstest/dist/; revision=271294 svn path=/vendor/pjdfstest/abf03c3a47745d4521b0e4aa141317553ca48f91/; revision=271295; tag=vendor/pjdfstest/abf03c3a47745d4521b0e4aa141317553ca48f91
Diffstat (limited to 'tests/link/02.t')
-rw-r--r--tests/link/02.t25
1 files changed, 25 insertions, 0 deletions
diff --git a/tests/link/02.t b/tests/link/02.t
new file mode 100644
index 000000000000..ca3e092edf99
--- /dev/null
+++ b/tests/link/02.t
@@ -0,0 +1,25 @@
+#!/bin/sh
+# $FreeBSD: head/tools/regression/pjdfstest/tests/link/02.t 211352 2010-08-15 21:24:17Z pjd $
+
+desc="link returns ENAMETOOLONG if a component of either pathname exceeded {NAME_MAX} characters"
+
+dir=`dirname $0`
+. ${dir}/../misc.sh
+
+echo "1..10"
+
+n0=`namegen`
+nx=`namegen_max`
+nxx="${nx}x"
+
+expect 0 create ${nx} 0644
+expect 0 link ${nx} ${n0}
+expect 0 unlink ${nx}
+expect 0 link ${n0} ${nx}
+expect 0 unlink ${n0}
+expect 0 unlink ${nx}
+
+expect 0 create ${n0} 0644
+expect ENAMETOOLONG link ${n0} ${nxx}
+expect 0 unlink ${n0}
+expect ENAMETOOLONG link ${nxx} ${n0}