On 06/05/2011 09:27 AM, Bruno Haible wrote:
> Hi Eric,
> 
> On AIX 7.1 I'm seeing this test failure:
> 
>   test-canonicalize-lgpl.c:69: assertion failed
>   FAIL: test-canonicalize-lgpl
> 
> The reason is apparently a bug in realpath. Here's a test case:

> 
>   result = realpath ("conftest.dir//.", NULL);
>   if (result != NULL) printf ("%s\n", result); else printf ("errno=%d\n", 
> errno)

> /home/haible/testdir1/gltests/conftest.dir/

Suspicious to have a trailing slash here when no one else does, but
allowed by POSIX.

>   result = realpath ("conftest.dir//./..", NULL);
>   if (result != NULL) printf ("%s\n", result); else printf ("errno=%d\n", 
> errno)

> /home/haible/testdir1/gltests/conftest.dir

Flat out wrong.  This should be /home/haible/testdir1/gltests.

>   result = realpath ("conftest.dir//./../conftest.dir", NULL);
>   if (result != NULL) printf ("%s\n", result); else printf ("errno=%d\n", 
> errno)

> errno=2

Flat out wrong.  The mere change from / to // in the middle of the
string should have no impact.

> 
> Do you think we should work around it?

Yes.  I'll work on that, and see if I can come up with anything in the
next hour or so.

-- 
Eric Blake   ebl...@redhat.com    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to