[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Multiple issues on GNU/hurd
From: |
Andreas Beckmann |
Subject: |
Re: Multiple issues on GNU/hurd |
Date: |
Sat, 30 Apr 2016 19:00:46 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Icedove/38.7.0 |
> On 03/01/16 11:27, James Youngman wrote:
>> On Sat, Jan 2, 2016 at 1:51 PM, Pádraig Brady <address@hidden> wrote:
>>> On 02/01/16 13:38, Andreas Metzler wrote:
>>>> Hello,
>>>>
>>>> when trying to build GNU findutils on GNU/hurd multiple gnulib
>>>> testsuite errors have come up:
>>>>
>>>> (sid_hurd-i386-dchroot)address@hidden:~/FIND/findutils-4.6.0/tests$
>>>> ./test-facc
>>>> essat
>>>> test-faccessat.c:36: assertion 'errno == EBADF' failed
>>>> Aborted
>>>
>>> Don't know about the above.
>>
>> Shouldn't we allow ENOTSUP too, when GNULIB_SUPPORT_ONLY_AT_FDCWD is
>> #defined? Here's the code:
>>
>> AT_FUNC_NAME (int fd, char const *file AT_FUNC_POST_FILE_PARAM_DECLS)
>> {
>> VALIDATE_FLAG (flag);
>>
>> if (fd == AT_FDCWD || IS_ABSOLUTE_FILE_NAME (file))
>> return CALL_FUNC (file);
>>
>> #ifdef GNULIB_SUPPORT_ONLY_AT_FDCWD
>> errno = ENOTSUP;
>> return FUNC_FAIL;
>> #else
>> {
>> ...
>>
>
> While that's logically correct I think,
> I don't think it's the issue as findutils
> doesn't define GNULIB_SUPPORT_ONLY_AT_FDCWD
> (emacs doesn't even use that define anymore).
>
> thanks,
> Pádraig
The faccessat() routine being used does not come from findutils' copy of
gnulib but from glibc. The glibc implementation starts with
http://sources.debian.net/src/glibc/2.22-7/sysdeps/mach/hurd/faccessat.c/#L27
int
faccessat (fd, file, type, flag)
int fd;
const char *file;
int type;
int flag;
{
error_t err;
file_t port;
int allowed, flags;
if ((flag & AT_EACCESS) == 0)
{
if (fd == AT_FDCWD || file[0] == '/')
return __access (file, type);
__set_errno (ENOTSUP); /* XXX later */
return -1;
}
[...]
So for the test doing
ASSERT (faccessat (-1, "foo", F_OK, 0) == -1);
ASSERT (errno == EBADF);
we get an errno of ENOTSUP
Andreas
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: Multiple issues on GNU/hurd,
Andreas Beckmann <=