On 1/17/2021 11:04 AM, Bruno Haible wrote:
Hi Paul,
Some of the new tests that you added to test-canonicalize.c and
test-canonicalize-lgpl.c on 2020-12-24 fail on Cygwin 2.9:
/* Check that a non-directory symlink with trailing slash yields NULL,
and likewise for other troublesome suffixes. */
{
char const *const file_name[]
= {
BASE "/huk/",
BASE "/huk/.",
BASE "/huk/./",
BASE "/huk/./.",
BASE "/huk/x",
BASE "/huk/..",
BASE "/huk/../",
BASE "/huk/../.",
BASE "/huk/../x",
BASE "/huk/./..",
BASE "/huk/././../x",
};
for (int i = 0; i < sizeof file_name / sizeof *file_name; i++)
{
...
The tests in the 'for' loop fail for i = 5 ... 10. That is, something
with the ".." handling is not working as expected.
I took a quick look, and it appears that this is a Cygwin bug in which
realpath() fails with ENOENT instead of ENOTDIR. (I've only checked this for
the first failure, but I suspect it's the same for all of them.) I'll submit a
patch to Cygwin to fix this, probably tomorrow.
Ken