From: Bruno Haible Date: Sat, 31 Jul 2010 10:23:44 +0000 (+0200) Subject: readlink: Relax test a bit. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;ds=sidebyside;h=4f2ec69bf1dbf08065d2e248f4fcee2a52f52675;p=pspp readlink: Relax test a bit. --- diff --git a/ChangeLog b/ChangeLog index 574a1a300d..edd0b8c68d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2010-07-31 Bruno Haible + + 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 copysign: Does not require -lm on glibc systems. diff --git a/tests/test-readlink.h b/tests/test-readlink.h index 1e482dfe7f..d96017503b 100644 --- a/tests/test-readlink.h +++ b/tests/test-readlink.h @@ -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"))