bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] test-futimens: avoid unwarranted test failure on Solaris 5.1


From: Eric Blake
Subject: Re: [PATCH] test-futimens: avoid unwarranted test failure on Solaris 5.11
Date: Mon, 11 Oct 2010 05:58:05 -0600
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.9) Gecko/20100921 Fedora/3.1.4-1.fc13 Mnenhy/0.8.3 Thunderbird/3.1.4

On 10/11/2010 04:51 AM, Jim Meyering wrote:
That's because futimens (AT_FDCWD, NULL) would fail with errno set to
EFAULT, rather than the expected value of EBADF.

At first I was going to relax the test to allow "|| errno == EFAULT",
but what if EFAULT is not defined?  There's only one other use in gnulib.

I agree that we should not relax things for EFAULT.

+++ 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);

However, I disagree with this change. The whole point of testing AT_FDCWD is that it IS an invalid fd, and implementations must reject it in a sane manner. Solaris 5.11 has a bug, and we need to enhance the .m4 test to reject this bug and improve our futimens wrapper to work around it. We already worked around this bug for glibc 2.11 (thankfully, it has been fixed for current glibc).

--
Eric Blake   address@hidden    +1-801-349-2682
Libvirt virtualization library http://libvirt.org



reply via email to

[Prev in Thread] Current Thread [Next in Thread]