Mercurial > hg > octave-lojdl > gnulib-hg
changeset 14505:ece10d05a1cf
tests: readlink* ("",... fails with EINVAL on newer kernels
readlink and readlinkat have typically failed with ENOENT for
the invalid, empty file name, "". However, with the advent
of linux-2.6.39, they fail with EINVAL.
* tests/test-areadlink.h (test_areadlink): Also accept EINVAL
when operating on the empty file name.
* tests/test-readlink.h (test_readlink): Likewise.
author | Jim Meyering <meyering@redhat.com> |
---|---|
date | Wed, 30 Mar 2011 08:46:22 +0200 |
parents | aca88fcb0493 |
children | 82dadacd5872 |
files | ChangeLog tests/test-areadlink.h tests/test-readlink.h |
diffstat | 3 files changed, 12 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2011-03-30 Jim Meyering <meyering@redhat.com> + + tests: readlink* ("",... fails with EINVAL on newer kernels + readlink and readlinkat have typically failed with ENOENT for + the invalid, empty file name, "". However, with the advent + of linux-2.6.39, they fail with EINVAL. + * tests/test-areadlink.h (test_areadlink): Also accept EINVAL + when operating on the empty file name. + * tests/test-readlink.h (test_readlink): Likewise. + 2011-03-29 Bruno Haible <bruno@clisp.org> Relicense some modules under LGPLv2+, for libidn2.
--- a/tests/test-areadlink.h +++ b/tests/test-areadlink.h @@ -36,7 +36,7 @@ ASSERT (errno == ENOENT); errno = 0; ASSERT (func ("", 1) == NULL); - ASSERT (errno == ENOENT); + ASSERT (errno == ENOENT || errno == EINVAL); errno = 0; ASSERT (func (".", 1) == NULL); ASSERT (errno == EINVAL);
--- a/tests/test-readlink.h +++ b/tests/test-readlink.h @@ -38,7 +38,7 @@ ASSERT (errno == ENOENT); errno = 0; ASSERT (func ("", buf, sizeof buf) == -1); - ASSERT (errno == ENOENT); + ASSERT (errno == ENOENT || errno == EINVAL); errno = 0; ASSERT (func (".", buf, sizeof buf) == -1); ASSERT (errno == EINVAL);