From 0afab138f4aedb7eaab70957c164aa0e5eb01fce Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Mon, 11 Oct 2010 12:44:56 +0200 Subject: [PATCH] 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. --- ChangeLog | 7 +++++++ tests/test-futimens.h | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 2f0f37050d..22a22dfa60 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2010-10-11 Jim Meyering + + 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 Indentation. diff --git a/tests/test-futimens.h b/tests/test-futimens.h index ab86ae2171..a0312b7f88 100644 --- a/tests/test-futimens.h +++ b/tests/test-futimens.h @@ -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 } }; -- 2.30.2