changeset 13792:b39b92f7ecc0

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.
author Jim Meyering <meyering@redhat.com>
date Mon, 11 Oct 2010 12:44:56 +0200
parents 904d5b74657e
children 0d3ad2d309ba
files ChangeLog tests/test-futimens.h
diffstat 2 files changed, 8 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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.
--- a/tests/test-futimens.h
+++ b/tests/test-futimens.h
@@ -75,7 +75,7 @@
 
   /* 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 } };