Artifacts Associated With Ticket 1018980
Ticket change [d03d7630fd] (rid 113143) by wildcard_25 on 2004-08-30 10:10:22:
- assignee initialized to: "vincentdarley"
- cmimetype initialized to: "text/plain"
- comment initialized to:
Tcl: v8.5a2 HEAD at 30-08-04 OS: WinXPsp1 Built with makefile.vc using VC7 ==== winFCmd-16.12 Windows file normalization FAILED ==== Contents of test case: set expectedResult [file normalize ${d}:] set ::env(HOME) ${d}: cd set result [pwd]; # <- Must not crash if { [string equal $result $expectedResult] } { concat ok } else { list $result != $expectedResult } ---- Result was: D:/ != D:/src_tcl/win ---- Result should have been (exact matching): ok ==== winFCmd-16.12 FAILED This can be summed up with:- (bin) 1 % set pwd [pwd] C:/Program Files/Tcl/bin (bin) 2 % file normalize "c:\program files" C:/Program Files/Tcl/bin/program files I also get failures on the clock tests for ":UTC" and ":GMT" not found, but this is probably due to the normalization failure. Clock tests affected are:- 31.1, 31.2, 31.3, 32.1, 34.3, 34.4, 34.5, 34.7, 34.8, 34.10, 34.11, 34.19, 34.20, 34.21, 34.22, 34.23, 34.24, 34.25, 34.29, 34.30, 34.31, 37.1. If these aren't corrected when the file normalization is, I'll re-submit them as a seperate bug. - foundin initialized to: "obsolete: 8.5a2"
- priority initialized to: "5 Medium"
- resolution initialized to: "None"
- status initialized to: "Open"
- submitter initialized to: "wildcard_25"
- subsystem initialized to: "36. Pathname Management"
- title initialized to: "winFCmd-16.12 failure on WinXP"
- type initialized to: "Bug"
Ticket change [44f7b9601e] (rid 116798) by vincentdarley on 2004-08-31 16:23:22:
- icomment:
Logged In: YES user_id=32170 Your last example is correct (but you have a problem with backslash quoting): % set a "c:\program files" c:program files You're using a volume-relative path, and so the result is perfectly correct. However, that doesn't change the fact that this test is showing up some sort of problem.
- login: "vincentdarley"
- mimetype: "text/plain"
- username: "vincentdarley"
- icomment:
Ticket change [a9b51d84ba] (rid 99192) by wildcard_25 on 2004-08-31 19:18:39:
- icomment:
Logged In: YES user_id=596509 maybe i should have just left off the '\program files' bit :) step by step from the test:- % set pwd [pwd] C:/Program Files/Tcl/bin (bin) 2 % set d [string index $pwd 0] C (bin) 3 % file normalize ${d}: C:/Program Files/Tcl/bin (bin) 4 % set ::env(HOME) ${d}: C: (bin) 5 % cd () 6 % set result [pwd] C:/ - login: "wildcard_25"
- mimetype: "text/plain"
- username: "wildcard_25"
- icomment:
Ticket change [eb490732a6] (rid 103523) by vincentdarley on 2004-09-27 18:24:17:
- icomment:
Logged In: YES user_id=32170 In this particular case, what should 'file pathtype ~' give. Currently Tcl defines all paths starting with '~' to be absolute paths, but the path here might be better as volumerelative.
- login: "vincentdarley"
- mimetype: "text/plain"
- username: "vincentdarley"
- icomment:
Ticket change [dee1ad9c9a] (rid 114925) by vincentdarley on 2004-09-27 22:00:58:
- closedate changed to: "2004-09-27T15:00:58"
- closer changed to: "vincentdarley"
- icomment:
Logged In: YES user_id=32170 Fixed.
- login: "vincentdarley"
- mimetype: "text/plain"
- resolution changed to: "Fixed"
- status changed to: "Closed"
- username: "vincentdarley"
Ticket change [1200a2c52d] (rid 95242) by wildcard_25 on 2004-09-28 11:00:10:
- icomment:
Logged In: YES user_id=596509 Given the conditions:- current directory on 'C:' = 'C:/temp' current directory on 'D:' = 'D:/temp' pwd = 'C:/temp' currently case1 'file normalize C:' == 'C:/temp' == pwd case2 'file normalize C:/' == 'C:/' case3 'file normalize D:' == 'D:/' case4 'file normalize D:/' == 'D:/' if 'case1' equals 'C:/temp' then 'case3' should equal 'D:/temp' or should 'case1' equal 'C:/'? - login: "wildcard_25"
- mimetype: "text/plain"
- username: "wildcard_25"
- icomment:
Ticket change [ac52a8a8b4] (rid 101274) by wildcard_25 on 2004-09-28 12:11:16:
- icomment:
Logged In: YES user_id=596509 I shoud also mention that test now passes by default as pwd = D:/ (or drive root where tclsh is run from) on entering the test and so isn't really testing anything. Test passes if entry pwd is not root but this is now due to another error. values of test with non-root pwd. [pwd] = D:/src_tcl_orig/win/Release pwd = D:/src_tcl_orig/win/Release d = D expectedResult = D:/src_tcl_orig/win/Release ::env(HOME) = D: result = D:/src_tcl_orig/win/Release cd no longer changes to HOME, either test needs '/' added to setting home and expected result, or D: needs to resolve to absolute path not volume relative. Which it is, depends on what 'file normalize C:' should do in my previous message.
- login: "wildcard_25"
- mimetype: "text/plain"
- resolution changed to: "None"
- status changed to: "Open"
- username: "wildcard_25"
- icomment:
Ticket change [284ed53f1f] (rid 88680) by vincentdarley on 2004-09-28 15:45:32:
- icomment:
Logged In: YES user_id=32170 Can you perhaps provide 1 or 2 new tests which test what you believe needs testing and which fail for you?
- login: "vincentdarley"
- mimetype: "text/plain"
- username: "vincentdarley"
- icomment:
Ticket change [0833ef5ab5] (rid 89522) by vincentdarley on 2004-09-28 22:37:00:
- icomment:
Logged In: YES user_id=32170 Note: for me pwd is not D:/, and the test passes fine. In one of your examples below, case 3 should indeed be D:/temp, but that would require rather large changes in Tcl to support, because Tcl doesn't understand the notion of a per-drive pwd. Hence, for anything other than the current drive, ${X}:foo is interpreted as relative to the root of $X. - login: "vincentdarley"
- mimetype: "text/plain"
- username: "vincentdarley"
- icomment:
Ticket change [7dffae7ded] (rid 97330) by wildcard_25 on 2004-09-28 23:46:40:
- icomment:
Logged In: YES user_id=596509 Wrote a big speel on the behavior of 'cd' in XP DOS and then realized that, according to tclPathObj.c, 'C:' is treated as relative if the cwd is also on drive C and absolute if not. Now that 'cd' with no args (ie ~) follow the same rules, my confusion is starting to clear. :) attached patch for winFCmd.test bumped new 16.13 to 17.1 diffent section/description fixes clean up for 16.11 was changing to root instead of back to old pwd modified 16.13 for absolute HOME path added 16.13 to test relative HOME path
- login: "wildcard_25"
- mimetype: "text/plain"
- username: "wildcard_25"
- icomment:
Ticket change [a28874ff1e] (rid 109913) by wildcard_25 on 2004-09-28 23:46:42:
- icomment:
File Added - 103065: winFCmd.test.patch
- login: "wildcard_25"
- mimetype: "text/plain"
- username: "wildcard_25"
- icomment:
Add attachment "winFCmd.test.patch" [9a51d79b6b] (rid 110928) by wildcard_25 on 2004-09-28 23:46:42.
Ticket change [4b8b2543be] (rid 126733) by vincentdarley on 2004-09-29 00:12:32:
- icomment:
Logged In: YES user_id=32170 I should add a caveat to my previous comment about case 3. While DOS does indeed seem to treat case 3 as D:/temp, in fact Tcl 8.0.x-8.3.x all treat it as 'D:/', and therefore Tcl 8.4 and 8.5 have followed that trend. (These are the comments you are probably referring to in tclPathObj.c). In principle this is perhaps a bug, but not one of major importance. I'll take a look at the patch -- thanks!
- login: "vincentdarley"
- mimetype: "text/plain"
- username: "vincentdarley"
- icomment:
Ticket change [cecb42673e] (rid 96112) by vincentdarley on 2004-09-29 00:21:27:
- icomment:
Logged In: YES user_id=32170 I've inserted your patch into my winFCmd.test, and all tests pass with CVS head. Is that your experience?
- login: "vincentdarley"
- mimetype: "text/plain"
- username: "vincentdarley"
- icomment:
Ticket change [611ab74744] (rid 92192) by wildcard_25 on 2004-09-29 08:40:31:
- icomment:
Logged In: YES user_id=596509 Yes, these tests pass for me. Yes, they were the comments I meant. My confusion started with 'cd', with no args, treating the HOME path as absolute and normalize not. The test was obviously meant to check that 'cd' changed to the HOME dir correctly, but the difference in path resolution was making it fail. After your patch, I ran the test again with puts output for the variables and everything was at root, so the test really wasn't testing anything useful, relative or absolute paths would have had the same result (turned out I had a CD-Disc in my drive triggering test 16.11 thus causing cwd to change to root, otherwise the test would have been testing relative resolution correctly).
- login: "wildcard_25"
- mimetype: "text/plain"
- username: "wildcard_25"
- icomment:
Ticket change [580d97dd44] (rid 117740) by vincentdarley on 2004-10-01 00:21:06:
- closedate changed to: "2004-09-30T17:21:06"
- closer changed to: "vincentdarley"
- icomment:
Logged In: YES user_id=32170 All of this is now in CVS, so closing the bug.
- login: "vincentdarley"
- mimetype: "text/plain"
- resolution changed to: "Fixed"
- status changed to: "Closed"
- username: "vincentdarley"