Artifacts Associated With Ticket 748960ffffffffff
Ticket change [cc183b4d05] (rid 95634) by mmokrejs on 2003-06-04 16:05:12:
- assignee initialized to: "dgp"
- cmimetype initialized to: "text/plain"
- comment initialized to:
Hi, I have compiled tcl8.4.3 on Tru64Unix (formerly OSF1) and make test fails in many cases. Would someone inspect the output? Thanks! I used cc/cxx from vendor, latest version, C*FLAGS"-O2 -arch ev56" if that matters. The original bugreport is at https://sourceforge.net/tracker/?func=detail&atid=110894&aid=748804&group_id=10894 NOTE, THAT THIS TEST FAILED ONLY WHEN TEST WAS PERFORMED ON AFS FILESYSTEM. WHEN TESTED ON NFS FILESYSTEM IT PASSED(IR IT'S NOT REPRODUCIBLE?). ==== cmdAH-20.5 Tcl_FileObjCmd: atime touch FAILED ==== Contents of test case: if {[string equal $tcl_platform(platform) "windows"]} { set old [pwd] cd $::tcltest::temporaryDirectory if {![string equal "NTFS" [testvolumetype]]} { # Windows FAT doesn't understand atime, but NTFS does # May also fail for Windows on NFS mounted disks cd $old return 1 } cd $old } set atime [file atime $file] after 1100; # pause a sec to notice change in atime set newatime [clock seconds] set modatime [file atime $file $newatime] expr {$newatime == $modatime ? 1 : "$newatime != $modatime"} ---- Result was: 1054725988 != 1054725987 ---- Result should have been (exact matching): 1 ==== cmdAH-20.5 FAILED - foundin initialized to: "obsolete: 8.4.3"
- priority initialized to: "5 Medium"
- resolution initialized to: "None"
- status initialized to: "Open"
- submitter initialized to: "mmokrejs"
- subsystem initialized to: "34. tcltest Package"
- title initialized to: "cmdAH.test failed"
- type initialized to: "Bug"
Ticket change [e6e78e6ba1] (rid 104369) by dgp on 2003-06-04 23:11:48:
- assignee changed to: "dkf"
- subsystem changed to: "16. Commands A-H"
Ticket change [d9f2bdb8ca] (rid 107697) by dkf on 2003-06-05 05:51:41:
- assignee changed to: "vincentdarley"
Ticket change [5f02318612] (rid 115737) by vincentdarley on 2003-06-05 14:58:53:
- assignee changed to: "dkf"
- icomment:
Logged In: YES user_id=32170 Sorry, just not my area of knowledge
- login: "vincentdarley"
- mimetype: "text/plain"
- username: "vincentdarley"
Ticket change [07692888b9] (rid 89394) by dkf on 2003-06-06 17:08:23:
- icomment:
Logged In: YES user_id=79902 Sounds like an unsynchronized clock; both NFS and AFS are very sensitive to that, and it's really a "misconfigured system" issue. Try using a local directory for your testing source tree (like /tmp, which ought not be in AFS!) to stop that factor from coming up.
- login: "dkf"
- mimetype: "text/plain"
- username: "dkf"
- icomment:
Ticket change [39152cd83d] (rid 112326) by mmokrejs on 2003-06-06 17:27:48:
- icomment:
Logged In: YES user_id=696559 All servers are synchronized using xntpd. I tried on NFS, tests pass as well as on local disk. On AFS filesystem tests cmdAH-20.5 and cmdAH-25.2 fail. ==== cmdAH-20.5 Tcl_FileObjCmd: atime touch FAILED ==== Contents of test case: if {[string equal $tcl_platform(platform) "windows"]} { set old [pwd] cd $::tcltest::temporaryDirectory if {![string equal "NTFS" [testvolumetype]]} { # Windows FAT doesn't understand atime, but NTFS does # May also fail for Windows on NFS mounted disks cd $old return 1 } cd $old } set atime [file atime $file] after 1100; # pause a sec to notice change in atime set newatime [clock seconds] set modatime [file atime $file $newatime] expr {$newatime == $modatime ? 1 : "$newatime != $modatime"} ---- Result was: 1054894829 != 1054894828 ---- Result should have been (exact matching): 1 ==== cmdAH-20.5 FAILED ==== cmdAH-25.2 Tcl_FileObjCmd: owned FAILED ==== Contents of test case: file owned $gorpfile ---- Result was: 0 ---- Result should have been (exact matching): 1 ==== cmdAH-25.2 FAILED I believe, the first fails because of the caching mechanism which delays the action a bit. The second test fails because on AFS filesystem the username/group does not have to match at all. Often I create files which have different owner/group. I believe both tests should have at least comments within the code that they might fail on AFS filesystem. It could be tested if the tesfile was created on AFS filesystem by executing fs command from normal shell(sh/bash etc): $ fs la tclUnixInit.c Access list for tclUnixInit.c is Normal rights: system:administrators rlidwka system:authuser rl system:anyuser rl $ The output may be longer or shorter, but the first line should stay. - login: "mmokrejs"
- mimetype: "text/plain"
- username: "mmokrejs"
- icomment:
Ticket change [e142800381] (rid 87416) by dkf on 2003-06-06 17:40:35:
- assignee changed to: "vincentdarley"
- icomment:
Logged In: YES user_id=79902 Ah, but is your client machine synched with the servers? to within 100ms? My recommendation (from experience with using AFS) is not to run the tests in AFS-mounted filesystems at all. AFS isn't very good at conforming to standard Unix FS semantics. (It isn't just Tcl that has trouble with this BTW.) If only the dratted thing was resilient across unexpected server reboots it wouldn't be so bad... :^( Vince, could you arrange for these tests to always be performed on a file in a temporary directory (i.e. below /tmp on unix)? That'd test what we're interested in but avoid the nastiness of networked FS semantic trouble. Moving the bug because the underlying problem is File System related.
- login: "dkf"
- mimetype: "text/plain"
- subsystem changed to: "37. File System"
- username: "dkf"
Ticket change [8b51f1e212] (rid 127543) by mmokrejs on 2003-06-06 18:07:11:
- icomment:
Logged In: YES user_id=696559 ntpdc> peers remote local st poll reach delay offset disp ======================================================================= =babirusa.gsf.de 146.107.217.72 3 128 377 0.00194 0.110239 0.00342 *warthog.gsf.de 146.107.217.72 3 128 377 0.00096 0.099535 0.00308 But I aggree /tmp is much better. - login: "mmokrejs"
- mimetype: "text/plain"
- username: "mmokrejs"
- icomment:
Ticket change [4700138686] (rid 99612) by mmokrejs on 2003-07-18 18:59:06:
- icomment:
Logged In: YES user_id=696559 I believe after the test uses /tmp and not current directory/tmp or whatever uses now, this report can be closed. When user is sure the current directory where the tree resides is located on local filesystem, the test passes.
- login: "mmokrejs"
- mimetype: "text/plain"
- username: "mmokrejs"
- icomment:
Ticket change [c949814c14] (rid 122257) by vincentdarley on 2003-07-18 20:50:58:
- assignee changed to: "dgp"
- icomment:
Logged In: YES user_id=32170 I don't have a relevant system to test on, but how about if you replace: set file [makeFile "data" touch.me] with: if {$::tcl_platform(platform) == "unix" && [file exists /tmp]} { set file [makeFile "data" touch.me /tmp] } else { set file [makeFile "data" touch.me] } and then you might also need to change 'removeFile' 30 lines later on to ensure the file is deleted. If you can test something like this, and provide a patch, we can fix the problem in both Tcl 8.4.4 and 8.5a0. Assigning to dgp, since I'm away the next 2 days and won't be able to check anything in in time for 8.4.4. - login: "vincentdarley"
- mimetype: "text/plain"
- username: "vincentdarley"
Ticket change [ea1cb6ef7d] (rid 103315) by dgp on 2003-07-18 21:56:31:
- assignee changed to: "dkf"
- icomment:
Logged In: YES user_id=80530 I suspect this was meant for dkf.
- login: "dgp"
- mimetype: "text/plain"
- username: "dgp"
Ticket change [ab66c0b288] (rid 101102) by mmokrejs on 2003-07-21 17:12:25:
- icomment:
Logged In: YES user_id=696559 Hi, the patch you proposed works: --- tests/cmdAH.test 4 Jul 2003 13:04:12 -0000 1.34 +++ tests/cmdAH.test 21 Jul 2003 10:04:15 -0000 @@ -1186,7 +1186,12 @@ # atime +# avoid problems with non-local filesystems +if {$::tcl_platform(platform) == "unix" && [file exists /tmp]} { + set file [makeFile "data" touch.me /tmp] +} else { set file [makeFile "data" touch.me] +} test cmdAH-20.1 {Tcl_FileObjCmd: atime} { list [catch {file atime a b c} msg] $msg Unfortunately, I don't know much about tcl, so I did not touch anythouf the removeFile as you suggested, but I cannot find the temporary file either. With the patch above I get an error further: ==== cmdAH-25.2 Tcl_FileObjCmd: owned FAILED ==== Contents of test case: file owned $gorpfile ---- Result was: 0 ---- Result should have been (exact matching): 1 ==== cmdAH-25.2 FAILED I run the test in-non-local filesystem (AFS, as root and AFS user). So this part of the test should also be executed locally, I believe. - login: "mmokrejs"
- mimetype: "text/plain"
- username: "mmokrejs"
- icomment:
Ticket change [6944420e64] (rid 103222) by vincentdarley on 2003-07-21 17:24:08:
- icomment:
Logged In: YES user_id=32170 I don't know anything about AFS, but it strikes me as a bug in AFS, not in Tcl's test suite that now 'file owned' returns the wrong value. I'm a bit concerned by the idea of hard-coding all sorts of hacks into the test suite to force this or that test into /tmp. If this is a general problem, perhaps [tcltest::temporaryDirectory] should check if we're on AFS and use /tmp itself. I've committed the other fix.
- login: "vincentdarley"
- mimetype: "text/plain"
- username: "vincentdarley"
- icomment:
Ticket change [5734e70a19] (rid 94444) by mmokrejs on 2003-07-21 17:42:52:
- icomment:
Logged In: YES user_id=696559 Well, on AFS there's no more valid the owner:group privilege system anymore. Therefore, it's is expected the test fails in many cases. The ls shell command for example shows owner root, group system. BUt I can be logged as another user, doesn't matter. What does matter is that I'm logged into AFS system in my session as AFS user xy. You cacn check if teh test directory is on AFS filesystem by the following shell command: fs la filename For example: # fs la tclsh Access list for tclsh is Normal rights: system:administrators rlidwka system:authuser rl system:anyuser rl # The output is just example output, but the return code of such command should be fine. You could alternatively test for /afs mountpoint, but it tells us only we are on AFS client machine. Can you tell me how to print the value of $gorpfile variable in the cmdAH.test file in the test 20.5? The files on AFS disk are currently owned by "me"(logged as root, really), so I'm curious why this does fail even in this case.
- login: "mmokrejs"
- mimetype: "text/plain"
- username: "mmokrejs"
- icomment:
Ticket change [8e936857aa] (rid 120133) by dkf on 2003-07-23 21:44:22:
- assignee changed to: "vincentdarley"
- icomment:
Logged In: YES user_id=79902 Real AFS support in Tcl would be very cool - we use it heavily here too - but is a major project. Making the test put its test files in a known-local filesystem is a good workaround, especially as it allows for testing of what the test is actually about (that the appropriate POSIX syscall - or its evil Windows twin - is made) instead of getting hung up on the bizarreness of a particular filesystem. It'll probably need a few changes, since the standard location for the temporary directory is system specific...
- login: "dkf"
- mimetype: "text/plain"
- username: "dkf"
Ticket change [c82f4f513c] (rid 122061) by vincentdarley on 2003-07-24 17:25:46:
- assignee changed to: "dkf"
- icomment:
Logged In: YES user_id=32170 This just isn't my area of expertise at all, so I'm afraid I'm dropping out of dealing with this particular issue.
- login: "vincentdarley"
- mimetype: "text/plain"
- username: "vincentdarley"
Ticket change [5e5368c2b2] (rid 115616) by dkf on 2003-07-24 20:15:19:
- assignee changed to: "vincentdarley"
- icomment:
Logged In: YES user_id=79902 Just patch the dratted test to run in /tmp on Unix (and somewhere likely on Windows/Mac where I've no expertise.) Add constraints if necessary. A wider fix (adding real AFS support) can wait for someone with time/effort/inclination but that person certainly isn't me at this stage!
- login: "dkf"
- mimetype: "text/plain"
- username: "dkf"
Ticket change [482de3467e] (rid 99838) by vincentdarley on 2003-09-16 23:05:52:
- closedate changed to: "2003-09-16T16:05:52"
- closer changed to: "vincentdarley"
- icomment:
Logged In: YES user_id=32170 Ok, fixed the test suite.
- login: "vincentdarley"
- mimetype: "text/plain"
- resolution changed to: "Fixed"
- status changed to: "Closed"
- username: "vincentdarley"