summaryrefslogtreecommitdiff
path: root/regress/sys/ffs/tests/link/10.t
diff options
context:
space:
mode:
Diffstat (limited to 'regress/sys/ffs/tests/link/10.t')
-rw-r--r--regress/sys/ffs/tests/link/10.t27
1 files changed, 27 insertions, 0 deletions
diff --git a/regress/sys/ffs/tests/link/10.t b/regress/sys/ffs/tests/link/10.t
new file mode 100644
index 00000000000..98fbeababa8
--- /dev/null
+++ b/regress/sys/ffs/tests/link/10.t
@@ -0,0 +1,27 @@
+#!/bin/sh
+# $FreeBSD: src/tools/regression/fstest/tests/link/10.t,v 1.1 2007/01/17 01:42:09 pjd Exp $
+
+desc="link returns EEXIST if the destination file does exist"
+
+n0=`namegen`
+n1=`namegen`
+
+expect 0 create ${n0} 0644
+
+expect 0 create ${n1} 0644
+expect EEXIST link ${n0} ${n1}
+expect 0 unlink ${n1}
+
+expect 0 mkdir ${n1} 0755
+expect EEXIST link ${n0} ${n1}
+expect 0 rmdir ${n1}
+
+expect 0 symlink test ${n1}
+expect EEXIST link ${n0} ${n1}
+expect 0 unlink ${n1}
+
+expect 0 mkfifo ${n1} 0644
+expect EEXIST link ${n0} ${n1}
+expect 0 unlink ${n1}
+
+expect 0 unlink ${n0}