]> CyberLeo.Net >> Repos - FreeBSD/releng/8.1.git/blob - tools/regression/fstest/tests/open/16.t
Copy stable/8 to releng/8.1 in preparation for 8.1-RC1.
[FreeBSD/releng/8.1.git] / tools / regression / fstest / tests / open / 16.t
1 #!/bin/sh
2 # $FreeBSD$
3
4 desc="open returns EMLINK/ELOOP when O_NOFOLLOW was specified and the target is a symbolic link"
5
6 dir=`dirname $0`
7 . ${dir}/../misc.sh
8
9 echo "1..6"
10
11 n0=`namegen`
12 n1=`namegen`
13
14 expect 0 symlink ${n0} ${n1}
15 expect "EMLINK|ELOOP" open ${n1} O_RDONLY,O_CREAT,O_NOFOLLOW 0644
16 expect "EMLINK|ELOOP" open ${n1} O_RDONLY,O_NOFOLLOW
17 expect "EMLINK|ELOOP" open ${n1} O_WRONLY,O_NOFOLLOW
18 expect "EMLINK|ELOOP" open ${n1} O_RDWR,O_NOFOLLOW
19 expect 0 unlink ${n1}