From: Eric Blake Date: Tue, 1 Mar 2011 23:27:51 +0000 (-0700) Subject: test-link: work on Hurd X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c36072eeb1ab0725dd73ae0c81e360d419b3eaf4;p=pspp test-link: work on Hurd * tests/test-link.h (test_link): Hurd rejects linking directories with EISDIR instead of the POSIX-mandated EPERM. Signed-off-by: Eric Blake --- diff --git a/ChangeLog b/ChangeLog index ceff3bf967..85a0e8bb71 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2011-03-01 Eric Blake + + test-link: work on Hurd + * tests/test-link.h (test_link): Hurd rejects linking directories + with EISDIR instead of the POSIX-mandated EPERM. + 2011-02-28 Paul Eggert stdio: simplify by moving files to printf-posix, sigpipe diff --git a/tests/test-link.h b/tests/test-link.h index 58982854b7..44ede5486e 100644 --- a/tests/test-link.h +++ b/tests/test-link.h @@ -136,13 +136,15 @@ test_link (int (*func) (char const *, char const *), bool print) else { /* Most everyone else. */ - ASSERT (errno == EPERM || errno == EACCES); + ASSERT (errno == EPERM || errno == EACCES || errno == EISDIR); errno = 0; ASSERT (func (BASE "d/.", BASE "c") == -1); - ASSERT (errno == EPERM || errno == EACCES || errno == EINVAL); + ASSERT (errno == EPERM || errno == EACCES || errno == EISDIR + || errno == EINVAL); errno = 0; ASSERT (func (BASE "d/.//", BASE "c") == -1); - ASSERT (errno == EPERM || errno == EACCES || errno == EINVAL); + ASSERT (errno == EPERM || errno == EACCES || errno == EISDIR + || errno == EINVAL); } } ASSERT (unlink (BASE "a") == 0);