bug-gnulib
[Top][All Lists]
Advanced

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

Re: Test failure on FreeBSD (permissible errno values)


From: Jim Meyering
Subject: Re: Test failure on FreeBSD (permissible errno values)
Date: Wed, 12 Sep 2012 17:15:13 +0200

Ed Maste wrote:

> I have four test failures when running the gnulib test suite (at 6418d7c961)
> on FreeBSD, some of which are clear FreeBSD bugs.  My test host is FreeBSD
> 9.1-PRERELEASE (r240164M).
>
> One that isn't clear to me is:
>
> test-canonicalize-lgpl.c:98: assertion failed
> Abort trap (core dumped)
> FAIL: test-canonicalize-lgpl
>
>     92    /* Check that a missing directory yields NULL.  */
>     93    {
>     94      char *result;
>     95      errno = 0;
>     96      result = canonicalize_file_name (BASE "/zzz/..");
>     97      ASSERT (result == NULL);
>     98      ASSERT (errno == ENOENT);
>     99    }
>
> (gdb) p errno
> $1 = 20 // ENOTDIR
>
> Should ENOTDIR be a permissible errno for this test?

Hi Ed,

Thanks for the testing!

What system call is failing for you?
Both on linux (fedora 17) and on freeBSD 9.0-RELEASE-p3,
the syscall in question is lstat, and it fails with ENOENT.
Here's the truss output from the freeBSD 9.0-RELEASE-p3 system:

  lstat("/.../gltests/t-can-lgpl.tmp/zzz",0xbfbfea6c) ERR#2 'No such file or 
directory'

It would better for application developers if you could help FreeBSD to work
like other systems.  Then, if someone wants to detect this case, they
can do it portably without having to know that FreeBSD 9.1 is different.



reply via email to

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