diff options
author | ngie <ngie@FreeBSD.org> | 2014-09-24 22:14:53 +0000 |
---|---|---|
committer | ngie <ngie@FreeBSD.org> | 2014-09-24 22:14:53 +0000 |
commit | c54ace5460023d27455228fcb5e05f44fbbec9fc (patch) | |
tree | 4dd4420439c8e5382c360af7884ec94d1718411d /contrib/pjdfstest | |
parent | ae3246822813320875454797fab48950351a6a71 (diff) | |
download | FreeBSD-src-c54ace5460023d27455228fcb5e05f44fbbec9fc.zip FreeBSD-src-c54ace5460023d27455228fcb5e05f44fbbec9fc.tar.gz |
Expect ELOOP on Darwin/Linux with "O_NOFOLLOW was specified and the target is a
symbolic link" case. Assume EMLINK on the rest of the OSes (FreeBSD, Solaris,
etc)
MFC after: 2 weeks
X-MFC with: r272057
Sponsored by: EMC / Isilon Storage Division
Diffstat (limited to 'contrib/pjdfstest')
-rw-r--r-- | contrib/pjdfstest/tests/open/16.t | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/contrib/pjdfstest/tests/open/16.t b/contrib/pjdfstest/tests/open/16.t index 598ed89..7f796d6 100644 --- a/contrib/pjdfstest/tests/open/16.t +++ b/contrib/pjdfstest/tests/open/16.t @@ -1,19 +1,27 @@ #!/bin/sh # $FreeBSD: head/tools/regression/pjdfstest/tests/open/16.t 219621 2011-03-13 19:35:13Z pjd $ -desc="open returns ELOOP when O_NOFOLLOW was specified and the target is a symbolic link" - dir=`dirname $0` . ${dir}/../misc.sh +case "${os}" in +Darwin|Linux) + error=ELOOP + ;; +*) + error=EMLINK + ;; +esac +desc="open returns $error when O_NOFOLLOW was specified and the target is a symbolic link" + echo "1..6" n0=`namegen` n1=`namegen` expect 0 symlink ${n0} ${n1} -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 $error open ${n1} O_RDONLY,O_CREAT,O_NOFOLLOW 0644 +expect $error open ${n1} O_RDONLY,O_NOFOLLOW +expect $error open ${n1} O_WRONLY,O_NOFOLLOW +expect $error open ${n1} O_RDWR,O_NOFOLLOW expect 0 unlink ${n1} |