readlink: Relax test a bit.
authorBruno Haible <bruno@clisp.org>
Sat, 31 Jul 2010 10:23:44 +0000 (12:23 +0200)
committerBruno Haible <bruno@clisp.org>
Sat, 31 Jul 2010 10:23:44 +0000 (12:23 +0200)
ChangeLog
tests/test-readlink.h

index 574a1a3..edd0b8c 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,14 @@
 2010-07-31  Bruno Haible  <bruno@clisp.org>
 
+       readlink: Relax test a bit.
+       * tests/test-readlink.h (test_readlink): Allow different errno value
+       when readlink is called with a file name that ends in / and refers to
+       a file.
+       Suggested by Eric Blake.
+       Reported by Rainer Tammer.
+
+2010-07-31  Bruno Haible  <bruno@clisp.org>
+
        copysign: Does not require -lm on glibc systems.
        * modules/copysign (configure.ac): Use gl_MATHFUNC, not
        gl_COMMON_DOUBLE_MATHFUNC.
index 1e482df..d960175 100644 (file)
@@ -51,7 +51,7 @@ test_readlink (ssize_t (*func) (char const *, char *, size_t), bool print)
   ASSERT (errno == EINVAL);
   errno = 0;
   ASSERT (func (BASE "file/", buf, sizeof buf) == -1);
-  ASSERT (errno == ENOTDIR);
+  ASSERT (errno == ENOTDIR || errno == EINVAL); /* AIX yields EINVAL */
 
   /* Now test actual symlinks.  */
   if (symlink (BASE "dir", BASE "link"))