[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

RE: dirent_uri-test failure on Windows ...?

From: Bert Huijben <rhuijben_at_sharpsvn.net>
Date: Wed, 4 Nov 2009 11:17:51 +0100

> -----Original Message-----
> From: Martin Hauner [mailto:martin.hauner_at_gmx.net]
> Sent: zondag 25 oktober 2009 11:34
> To: dev_at_subversion.tigris.org
> Subject: dirent_uri-test failure on Windows ...?
>
> Hi,
>
> I get a test failure with my mingw build in dirent_uri-test:
> test_dirent_get_absolute.
>
> After stepping into the code to find the problem, which is a drive
> letter case
> mismatch again, I thought this should fail with a visual studio build
> too (vs
> 2008 express). And indeed it does.
>
> The reason seems to be that "everyone" thinks the drive letters should
> be upper
> case (there are various comments in svn and apr that the letter must be
> upper
> case) but GetFullPathNameW returns a path with a lower case drive
> letter.
>
> That's just an observation. I never cared about lower or upper case
> drive
> letters before. So I have no idea why this is so and what is right ;-))
>
> The issue is inside apr but I wonder if anyone else is getting this?
>
>
> I'm not sure if anyone can follow this, but here is what's happening
> inside the
> test and apr:
>
> Test Case: dirent_uri-test.c (test_dirent_get_absolute, Line 2220)
>
> { "C:abc", "@/abc" },
>
> expect_abs: 0x3dda98 "C:/Development/mingw/svn-
> trunk/subversion/tests/cmdline/abc"
>
> svn_dirent_get_absolute
> apr_filepath_merge (file_io/win32/filepath.c, apr 1.3)
> Line 362
> apr_filepath_root => addroot = "C:", addtype = APR_EINCOMPLETE
> Line 424
> filepath_drive_get => lowercase drive letter (GetFullPathNameW)
> Line 437
> apr_filepath_root => baseroot = "c:/", basetype = APR_EABSOLUTE
> Line 537
> else if (addroot[0] && addroot[1] == ':' && !addroot[2])
> Line 543
> if (addroot[0] == baseroot[0] && baseroot[1] == ':') {
>
> here it fails because the case does not match!
>
> and svn reports an
> SVN_ERR_BAD_FILENAME, "Couldn't determine absolute path of 'C:abc'"
>
> If I change the case in gdb by hand the tests succeeds.

Added an XFail test on this specific issue in r40370.

        Bert

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2414367
Received on 2009-11-04 11:18:19 CET

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.