[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: realpath on AIX 7.1
From: |
Eric Blake |
Subject: |
Re: realpath on AIX 7.1 |
Date: |
Mon, 06 Jun 2011 15:50:31 -0600 |
User-agent: |
Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.17) Gecko/20110428 Fedora/3.1.10-1.fc14 Lightning/1.0b3pre Mnenhy/0.8.3 Thunderbird/3.1.10 |
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 address@hidden +1-801-349-2682
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature