summaryrefslogtreecommitdiffstats
path: root/tools/regression/fstest/tests/open/16.t
blob: ebf179ebb503f8e0989a645fd73365b6dc9e75de (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/bin/sh
# $FreeBSD$

desc="open returns EMLINK/ELOOP when O_NOFOLLOW was specified and the target is a symbolic link"

dir=`dirname $0`
. ${dir}/../misc.sh

echo "1..6"

n0=`namegen`
n1=`namegen`

expect 0 symlink ${n0} ${n1}
expect "EMLINK|ELOOP" open ${n1} O_RDONLY,O_CREAT,O_NOFOLLOW 0644
expect "EMLINK|ELOOP" open ${n1} O_RDONLY,O_NOFOLLOW
expect "EMLINK|ELOOP" open ${n1} O_WRONLY,O_NOFOLLOW
expect "EMLINK|ELOOP" open ${n1} O_RDWR,O_NOFOLLOW
expect 0 unlink ${n1}
OpenPOWER on IntegriCloud