summaryrefslogtreecommitdiffstats
path: root/tools/regression/fstest/tests/open/16.t
diff options
context:
space:
mode:
Diffstat (limited to 'tools/regression/fstest/tests/open/16.t')
-rw-r--r--tools/regression/fstest/tests/open/16.t20
1 files changed, 15 insertions, 5 deletions
diff --git a/tools/regression/fstest/tests/open/16.t b/tools/regression/fstest/tests/open/16.t
index 7b4194e..ec31768 100644
--- a/tools/regression/fstest/tests/open/16.t
+++ b/tools/regression/fstest/tests/open/16.t
@@ -1,7 +1,7 @@
#!/bin/sh
# $FreeBSD$
-desc="open returns EMLINK when O_NOFOLLOW was specified and the target is a symbolic link"
+desc="open returns EMLINK/ELOOP when O_NOFOLLOW was specified and the target is a symbolic link"
dir=`dirname $0`
. ${dir}/../misc.sh
@@ -12,8 +12,18 @@ n0=`namegen`
n1=`namegen`
expect 0 symlink ${n0} ${n1}
-expect EMLINK open ${n1} O_RDONLY,O_CREAT,O_NOFOLLOW 0644
-expect EMLINK open ${n1} O_RDONLY,O_NOFOLLOW
-expect EMLINK open ${n1} O_WRONLY,O_NOFOLLOW
-expect EMLINK open ${n1} O_RDWR,O_NOFOLLOW
+case "${os}" in
+SunOS)
+ 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 EMLINK open ${n1} O_RDONLY,O_CREAT,O_NOFOLLOW 0644
+ expect EMLINK open ${n1} O_RDONLY,O_NOFOLLOW
+ expect EMLINK open ${n1} O_WRONLY,O_NOFOLLOW
+ expect EMLINK open ${n1} O_RDWR,O_NOFOLLOW
+ ;;
+esac
expect 0 unlink ${n1}
OpenPOWER on IntegriCloud