]> CyberLeo.Net >> Repos - FreeBSD/releng/8.1.git/blob - tools/regression/fstest/tests/link/10.t
Copy stable/8 to releng/8.1 in preparation for 8.1-RC1.
[FreeBSD/releng/8.1.git] / tools / regression / fstest / tests / link / 10.t
1 #!/bin/sh
2 # $FreeBSD$
3
4 desc="link returns EEXIST if the destination file does exist"
5
6 dir=`dirname $0`
7 . ${dir}/../misc.sh
8
9 echo "1..14"
10
11 n0=`namegen`
12 n1=`namegen`
13
14 expect 0 create ${n0} 0644
15
16 expect 0 create ${n1} 0644
17 expect EEXIST link ${n0} ${n1}
18 expect 0 unlink ${n1}
19
20 expect 0 mkdir ${n1} 0755
21 expect EEXIST link ${n0} ${n1}
22 expect 0 rmdir ${n1}
23
24 expect 0 symlink test ${n1}
25 expect EEXIST link ${n0} ${n1}
26 expect 0 unlink ${n1}
27
28 expect 0 mkfifo ${n1} 0644
29 expect EEXIST link ${n0} ${n1}
30 expect 0 unlink ${n1}
31
32 expect 0 unlink ${n0}