|
View:
New views
3 Messages
—
Rating Filter:
Alert me
|
|
|
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. -- Martin Subcommander 2.0.0 Beta 5 - http://subcommander.tigris.org a Win32/Unix/MacOSX subversion GUI client & diff/merge tool. ------------------------------------------------------ http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2411150 |
|
|
RE: dirent_uri-test failure on Windows ...?> -----Original Message-----
> From: Martin Hauner [mailto:martin.hauner@...] > Sent: zondag 25 oktober 2009 11:34 > To: dev@... > 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. Ok.. I found a way to reproduce getting a lower case path. (I never saw this issue before) Open a cmd.exe Type > cd c:\Windows And your c: cwd will be "c:\Windows" (lower case 'c') Type > cd C:\Windows\System32 And your c: cwd will be "C:\Windows\System32" (upper case 'C') If you just use "d:' to switch drives, you will never get a lower case drive letter. The reason you see this is most likely that you use a different shell, or it would have been reported years ago. I assume this will have to be fixed in apr and not in Subversion, as apr returns an error here. It would help us if apr would normalize its output to upper case here, instead of returning the right 'as is' value. Bert ------------------------------------------------------ http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2411238 |
|
|
RE: dirent_uri-test failure on Windows ...?> -----Original Message-----
> From: Martin Hauner [mailto:martin.hauner@...] > Sent: zondag 25 oktober 2009 11:34 > To: dev@... > 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 |
| Free embeddable forum powered by Nabble | Forum Help |