test-futimens: avoid unwarranted test failure on Solaris 5.11
authorJim Meyering <meyering@redhat.com>
Mon, 11 Oct 2010 10:44:56 +0000 (12:44 +0200)
committerJim Meyering <meyering@redhat.com>
Mon, 11 Oct 2010 10:45:07 +0000 (12:45 +0200)
* tests/test-futimens.h (test_futimens): When provoking EBADF, use an
invalid file descriptor, so we don't provoke EFAULT from Solaris 5.11,
because it tries to dereference the NULL name argument.

ChangeLog
tests/test-futimens.h

index 2f0f370..22a22df 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2010-10-11  Jim Meyering  <meyering@redhat.com>
+
+       test-futimens: avoid unwarranted test failure on Solaris 5.11
+       * tests/test-futimens.h (test_futimens): When provoking EBADF, use an
+       invalid file descriptor, so we don't provoke EFAULT from Solaris 5.11,
+       because it tries to dereference the NULL name argument.
+
 2010-10-11  Bruno Haible  <bruno@clisp.org>
 
        Indentation.
index ab86ae2..a0312b7 100644 (file)
@@ -75,7 +75,7 @@ test_futimens (int (*func) (int, struct timespec const *),
 
   /* Invalid arguments.  */
   errno = 0;
-  ASSERT (func (AT_FDCWD, NULL) == -1);
+  ASSERT (func (-1, NULL) == -1);
   ASSERT (errno == EBADF);
   {
     struct timespec ts[2] = { { Y2K, UTIME_BOGUS_POS }, { Y2K, 0 } };