Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 24 Sep 2014 22:14:54 +0000 (UTC)
From:      Garrett Cooper <ngie@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r272083 - head/contrib/pjdfstest/tests/open
Message-ID:  <201409242214.s8OMEsjL035030@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: ngie
Date: Wed Sep 24 22:14:53 2014
New Revision: 272083
URL: http://svnweb.freebsd.org/changeset/base/272083

Log:
  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

Modified:
  head/contrib/pjdfstest/tests/open/16.t

Modified: head/contrib/pjdfstest/tests/open/16.t
==============================================================================
--- head/contrib/pjdfstest/tests/open/16.t	Wed Sep 24 21:17:03 2014	(r272082)
+++ head/contrib/pjdfstest/tests/open/16.t	Wed Sep 24 22:14:53 2014	(r272083)
@@ -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}



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201409242214.s8OMEsjL035030>