| Ticket UUID: | 2003130 | ||
| Title: | failing fCmd.test tests on new fileserver | ||
| Type: | Bug | Created on: | 2008-06-26 12:35:34 |
| Submitter: | dgp | Assigned to: | ferrieux |
| Subsystem: | 37. File System | Severity: | |
| Priority: | 5 Medium | Last modified: | 2008-07-03 23:49:13 |
| Status: | Open | Closed by: | |
| Resolution: | None | Closed on: | |
| Version: | obsolete: 8.5.3 | ||
| Description: | ||||
My Tcl sandboxes got moved to a new
fileserver, and all branches now show
these test failures:
==== fCmd-6.16 CopyRenameOneFile: TclpCopyRenameOneFile fails FAILED
==== Contents of test case:
file mkdir [file join td1 td2]
createfile [file join td1 td2 tf1]
file mkdir td2
file rename -force td2 td1
---- Result was:
error renaming "td2" to "td1/td2": illegal operation on a directory
---- Result should have been (glob matching):
error renaming "td2" to "td1/td2": file *
==== fCmd-6.16 FAILED
==== fCmd-6.18 CopyRenameOneFile: errno != EXDEV FAILED
==== Contents of test case:
file mkdir [file join td1 td2]
createfile [file join td1 td2 tf1]
file mkdir td2
file rename -force td2 td1
---- Result was:
error renaming "td2" to "td1/td2": illegal operation on a directory
---- Result should have been (glob matching):
error renaming "td2" to "td1/td2": file *
==== fCmd-6.18 FAILED
==== fCmd-9.9 file rename: comprehensive: dir to non-empty dir FAILED
==== Contents of test case:
file mkdir tds1
file mkdir tds2
file mkdir [file join tdd1 tds1 xxx]
file mkdir [file join tdd2 tds2 xxx]
if {![testConstraint unix]} {
testchmod 555 tds2
}
set a1 [list [catch {file rename -force tds1 tdd1} msg] $msg]
set a2 [list [catch {file rename -force tds2 tdd2} msg] $msg]
if {[testConstraint unix]} {
set w2 0
} else {
set w2 [file writable tds2]
}
list [lsort [glob td*]] $a1 $a2 [file writable tds1] $w2
---- Result was:
{tdd1 tdd2 tds1 tds2} {1 {error renaming "tds1" to "tdd1/tds1": illegal operation on a directory}} {1 {error renaming "tds2" to "tdd2/tds2": illegal operation on a directory}} 1 0
---- Result should have been (glob matching):
{tdd1 tdd2 tds1 tds2} {1 {error renaming "tds1" to "tdd1/tds1": file *}} {1 {error renaming "tds2" to "tdd2/tds2": file *}} 1 0
==== fCmd-9.9 FAILED
==== fCmd-9.13 file rename: comprehensive: can't overwrite target FAILED
==== Contents of test case:
file mkdir [file join td1 td2] [file join td2 td1 td4]
file rename -force td1 td2
---- Result was:
error renaming "td1" to "td2/td1": illegal operation on a directory
---- Result should have been (glob matching):
error renaming "td1" to "td2/td1": file *
==== fCmd-9.13 FAILED
These are just differences in error message,
perhaps reflecting different values of errno.
I suspect the way to fix is to make the tests
care less about the exact error message wording.
| ||||
| User Comments: | ||||
ferrieux added on 2008-06-26 20:33:19:
Logged In: YES user_id=496139 Originator: NO Indeed when I compare behavior between a local disk and an NFS share, old versions of Tcl would consistently say "file already exists", while HEAD says "file busy" on NFS. After a bit of strace, I see that the underlying errnos are respectively ENOTEMPTY and EBUSY. Notice that the test case already account for this slight variability (see comment on fCmd-9.9: Test can hit EEXIST or EBUSY, depending on underlying filesystem), by using "file *" as error pattern. However your case is a bit nastier. Can you strace/truss and find the syscall returning EISDIR (responsible for "illegal operation on directory") ? dgp added on 2008-06-28 01:33:32:
Logged In: YES user_id=80530 Originator: YES The rename() system call in DoRenameFile() in tclUnixFCmd.c is the origin of the EISDIR errno. I see we have a history of postprocessing in that routine to deal with platform diversity. dgp added on 2008-07-03 23:49:13:
Logged In: YES user_id=80530 Originator: YES Just to note it, it appears that tests fCmd-6.16 and fCmd-6.18 are identical. | ||||
