With this commit included, Rainer's logs now show that the failure at
test-readlink.h:54 is gone. The next one is a bit later:

  test-readlink.h:77: assertion failed
  FAIL: test-readlink

and also

  test-areadlink.h:52: assertion failed
  FAIL: test-areadlink

In the same spirit, I'm committing this; it will hopefully fix these test
failures on AIX 6.1 and 7.1.


2010-07-31  Bruno Haible  <br...@clisp.org>

        readlink, areadlink: Relax test a bit.
        * tests/test-readlink.h (test_readlink): Accept EINVAL as an
        alternative to ENOTDIR.
        * tests/test-areadlink.h (test_areadlink): Likewise.
        Reported by Rainer Tammer.

--- tests/test-areadlink.h.orig Sat Jul 31 22:41:43 2010
+++ tests/test-areadlink.h      Sat Jul 31 22:39:36 2010
@@ -49,7 +49,7 @@
   ASSERT (errno == EINVAL);
   errno = 0;
   ASSERT (func (BASE "file/", 1) == NULL);
-  ASSERT (errno == ENOTDIR);
+  ASSERT (errno == ENOTDIR || errno == EINVAL); /* AIX yields EINVAL */
   ASSERT (unlink (BASE "file") == 0);
 
   /* Now test actual symlinks.  */
--- tests/test-readlink.h.orig  Sat Jul 31 22:41:43 2010
+++ tests/test-readlink.h       Sat Jul 31 22:37:54 2010
@@ -74,7 +74,7 @@
   ASSERT (symlink (BASE "file", BASE "link2") == 0);
   errno = 0;
   ASSERT (func (BASE "link2/", buf, sizeof buf) == -1);
-  ASSERT (errno == ENOTDIR);
+  ASSERT (errno == ENOTDIR || errno == EINVAL); /* AIX yields EINVAL */
   ASSERT (unlink (BASE "file") == 0);
   ASSERT (unlink (BASE "link2") == 0);
   {

Reply via email to