Bruno Haible wrote: >> 2 x FAIL: test-linkat > > On AIX 7.1, the linkat() function apparently fails with EINVAL when on > Linux it returns other errno values. Here's the minimal change to make > the test pass. OK to apply? > > > 2011-06-19 Bruno Haible <br...@clisp.org> > > linkat test: Avoid test failure on AIX 7.1. > * tests/test-linkat.c (main): Allow EINVAL as alternate error value. > * tests/test-link.h (test_link): Likewise.
Fine by me. It's getting pretty messy, but that is less of a concern with a test than with the code in lib/. Thanks! > --- tests/test-link.h.orig Sun Jun 19 16:30:07 2011 > +++ tests/test-link.h Sun Jun 19 16:22:23 2011 > @@ -115,10 +115,10 @@ > ASSERT (errno == ENOENT); > errno = 0; > ASSERT (func (BASE "a/", BASE "c") == -1); > - ASSERT (errno == ENOTDIR); > + ASSERT (errno == ENOTDIR || errno == EINVAL); > errno = 0; > ASSERT (func (BASE "a", BASE "c/") == -1); > - ASSERT (errno == ENOTDIR || errno == ENOENT); > + ASSERT (errno == ENOTDIR || errno == ENOENT || errno == EINVAL); > > /* Most platforms reject hard links to directories, and even on > those that do permit it, most users can't create them. We assume > @@ -164,11 +164,12 @@ > } > errno = 0; > ASSERT (func (BASE "b", BASE "link/") == -1); > - ASSERT (errno == ENOTDIR || errno == ENOENT || errno == EEXIST); > + ASSERT (errno == ENOTDIR || errno == ENOENT || errno == EEXIST > + || errno == EINVAL);