POSIX accepts only ELOOP if O_NOFOLLOW is specified and target is a symlink.
This commit is contained in:
parent
e7272ff323
commit
fb7db28c25
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=219621
@ -1,7 +1,7 @@
|
||||
#!/bin/sh
|
||||
# $FreeBSD$
|
||||
|
||||
desc="open returns EMLINK/ELOOP when O_NOFOLLOW was specified and the target is a symbolic link"
|
||||
desc="open returns ELOOP when O_NOFOLLOW was specified and the target is a symbolic link"
|
||||
|
||||
dir=`dirname $0`
|
||||
. ${dir}/../misc.sh
|
||||
@ -12,8 +12,8 @@ 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 ELOOP open ${n1} O_RDONLY,O_CREAT,O_NOFOLLOW 0644
|
||||
expect ELOOP open ${n1} O_RDONLY,O_NOFOLLOW
|
||||
expect ELOOP open ${n1} O_WRONLY,O_NOFOLLOW
|
||||
expect ELOOP open ${n1} O_RDWR,O_NOFOLLOW
|
||||
expect 0 unlink ${n1}
|
||||
|
Loading…
Reference in New Issue
Block a user