test-link: allow Linux choice of errno
authorEric Blake <ebb9@byu.net>
Thu, 10 Sep 2009 03:46:11 +0000 (21:46 -0600)
committerEric Blake <ebb9@byu.net>
Thu, 10 Sep 2009 03:53:45 +0000 (21:53 -0600)
* tests/test-link.c (main): Relax test for alternate error.

Signed-off-by: Eric Blake <ebb9@byu.net>
ChangeLog
tests/test-link.c

index a9664bc..177ac62 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2009-09-09  Eric Blake  <ebb9@byu.net>
 
+       test-link: allow Linux choice of errno
+       * tests/test-link.c (main): Relax test for alternate error.
+
        strndup: fix improper m4 caching
        * m4/strndup.m4 (gl_FUNC_STRNDUP): Rework to avoid side effects
        inside AC_CACHE_CHECK.  Use REPLACE_STRNDUP, not HAVE_STRNDUP.
index fbc794a..e09a0bb 100644 (file)
@@ -139,7 +139,7 @@ main (int argc, char **argv)
   ASSERT (errno == ENOTDIR);
   errno = 0;
   ASSERT (link (BASE "a", BASE "c/") == -1);
-  ASSERT (errno == ENOTDIR);
+  ASSERT (errno == ENOTDIR || errno == ENOENT);
   errno = 0;
   ASSERT (link (BASE "d", BASE "c") == -1);
   ASSERT (errno == EPERM || errno == EACCES);