Tcl Source Code

View Ticket
Login
Ticket UUID: 1519714
Title: Errors testing tcl 8.5a4
Type: Bug Created on: 2006-07-09 22:40:56
Submitter: pierre42 Assigned to: vincentdarley
Subsystem: 37. File System Severity:
Priority: 5 Medium Last modified: 2008-01-28 10:20:10
Status: Closed Closed by: sf-robot
Resolution: Out of Date Closed on: 2008-01-28 03:20:10
Version: obsolete: 8.5a4
Description:
[...]
clock.test
cmdAH.test

==== cmdAH-16.3 Tcl_FileObjCmd: readable FAILED
==== Contents of test case:
file reada $gorpfile
---- Result was:
1
---- Result should have been (exact matching):
0
==== cmdAH-16.3 FAILED


==== cmdAH-17.2 Tcl_FileObjCmd: writable FAILED
==== Contents of test case:
file writable $gorpfile
---- Result was:
1
---- Result should have been (exact matching):
0
==== cmdAH-17.2 FAILED


==== cmdAH-19.11 Tcl_FileObjCmd: exists FAILED
==== Contents of test case:

    file delete -force /tmp/tcl.foo.dir/file
    file delete -force /tmp/tcl.foo.dir
    makeDirectory /tmp/tcl.foo.dir
    makeFile 12345 /tmp/tcl.foo.dir/file
    file attributes /tmp/tcl.foo.dir -permissions 0000

    set result [file exists /tmp/tcl.foo.dir/file]

    file attributes /tmp/tcl.foo.dir -permissions 0775
    removeFile /tmp/tcl.foo.dir/file
    removeDirectory /tmp/tcl.foo.dir
    set result

---- Result was:
1
---- Result should have been (exact matching):
0
==== cmdAH-19.11 FAILED


==== cmdAH-25.3 Tcl_FileObjCmd: owned FAILED
==== Contents of test case:

    file owned /

---- Result was:
1
---- Result should have been (exact matching):
0
==== cmdAH-25.3 FAILED

cmdIL.test
[...]
expr.test
fCmd.test

==== fCmd-4.11 TclFileMakeDirsCmd: doesn't exist: errno
!= ENOENT FAILED
==== Contents of test case:

    cleanup
    file mkdir td1/td2/td3
    testchmod 000 td1/td2
    set msg [list [catch {file mkdir td1/td2/td3/td4}
msg] $msg]
    testchmod 755 td1/td2
    set msg

---- Result was:
0 {}
---- Result should have been (exact matching):
1 {can't create directory "td1/td2/td3": permission denied}
==== fCmd-4.11 FAILED


==== fCmd-4.14 TclFileMakeDirsCmd: TclpCreateDirectory
fails FAILED
==== Contents of test case:

    cleanup
    file delete -force foo
    file mkdir foo
    file attr foo -perm 040000
    set result [list [catch {file mkdir foo/tf1} msg] $msg]
    file delete -force foo
    set result

---- Result was:
0 {}
---- Result should have been (exact matching):
1 {can't create directory "foo/tf1": permission denied}
==== fCmd-4.14 FAILED


==== fCmd-6.6 CopyRenameOneFile: errno != ENOENT FAILED
==== Contents of test case:

    cleanup
    file mkdir td1
    testchmod 000 td1
    createfile tf1
    set msg [list [catch {file rename tf1 td1} msg] $msg]
    testchmod 755 td1
    set msg

---- Result was:
0 {}
---- Result should have been (exact matching):
1 {error renaming "tf1" to "td1/tf1": permission denied}
==== fCmd-6.6 FAILED


==== fCmd-6.24 CopyRenameOneFile: error uses original
name FAILED
==== Contents of test case:

    cleanup
    file mkdir ~/td1/td2
    set td1name [file join [file dirname ~] [file tail
~] td1]
    file attributes $td1name -permissions 0000
    set msg [list [catch {file copy ~/td1 td1} msg] $msg]
    file attributes $td1name -permissions 0755
    file delete -force ~/td1
    set msg

---- Result was:
0 {}
---- Result should have been (exact matching):
1 {error copying "~/td1": permission denied}
==== fCmd-6.24 FAILED


==== fCmd-6.25 CopyRenameOneFile: error uses original
name FAILED
==== Contents of test case:

    cleanup
    file mkdir td2
    file mkdir ~/td1
    set td1name [file join [file dirname ~] [file tail
~] td1]
    file attributes $td1name -permissions 0000
    set msg [list [catch {file copy td2 ~/td1} msg] $msg]
    file attributes $td1name -permissions 0755
    file delete -force ~/td1
    set msg

---- Result was:
0 {}
---- Result should have been (exact matching):
1 {error copying "td2" to "~/td1/td2": permission denied}
==== fCmd-6.25 FAILED


==== fCmd-6.26 CopyRenameOneFile: doesn't use original
name FAILED
==== Contents of test case:

    cleanup
    file mkdir ~/td1/td2
    set td2name [file join [file dirname ~] [file tail
~] td1 td2]
    file attributes $td2name -permissions 0000
    set msg [list [catch {file copy ~/td1 td1} msg] $msg]
    file attributes $td2name -permissions 0755
    file delete -force ~/td1
    set msg

---- Result was:
0 {}
---- Result should have been (exact matching):
1 {error copying "~/td1" to "td1": "/root/td1/td2":
permission denied}
==== fCmd-6.26 FAILED


==== fCmd-6.30 CopyRenameOneFile: TclpRemoveDirectory
failed FAILED
==== Contents of test case:

    cleanup
    file mkdir foo/bar
    file attr foo -perm 040555
    set catchResult [catch {file rename foo/bar /tmp} msg]
    set msg [lindex [split $msg :] end]
    catch {file delete /tmp/bar}
    catch {file attr foo -perm 040777}
    catch {file delete -force foo}
    list $catchResult $msg

---- Result was:
0 {}
---- Result should have been (exact matching):
1 { permission denied}
==== fCmd-6.30 FAILED


==== fCmd-9.1 file rename: comprehensive: EACCES FAILED
==== Contents of test case:

    cleanup
    file mkdir td1
    file mkdir td2
    file attr td2 -perm 040000
    set result [list [catch {file rename td1 td2/} msg]
$msg]
    file delete -force td2
    file delete -force td1
    set result

---- Result was:
0 {}
---- Result should have been (exact matching):
1 {error renaming "td1" to "td2/td1": permission denied}
==== fCmd-9.1 FAILED


==== fCmd-9.3 file rename: comprehensive: file to new
name FAILED
==== Contents of test case:

    cleanup
    createfile tf1
    createfile tf2
    testchmod 444 tf2
    file rename tf1 tf3
    file rename tf2 tf4
    list [lsort [glob tf*]] [file writable tf3] [file
writable tf4]

---- Result was:
{tf3 tf4} 1 1
---- Result should have been (exact matching):
{tf3 tf4} 1 0
==== fCmd-9.3 FAILED


==== fCmd-9.4 file rename: comprehensive: dir to new
name FAILED
==== Contents of test case:

    cleanup
    file mkdir td1 td2
    testchmod 555 td2
    file rename td1 td3
    file rename td2 td4
    list [lsort [glob td*]] [file writable td3] [file
writable td4]

---- Result was:
{td3 td4} 1 1
---- Result should have been (exact matching):
{td3 td4} 1 0
==== fCmd-9.4 FAILED


==== fCmd-9.5 file rename: comprehensive: file to self
FAILED
==== Contents of test case:

    cleanup
    createfile tf1 tf1
    createfile tf2 tf2
    testchmod 444 tf2
    file rename -force tf1 tf1
    file rename -force tf2 tf2
    list [contents tf1] [contents tf2] [file writable
tf1] [file writable tf2]

---- Result was:
tf1 tf2 1 1
---- Result should have been (exact matching):
tf1 tf2 1 0
==== fCmd-9.5 FAILED


==== fCmd-9.6 file rename: comprehensive: dir to self
FAILED
==== Contents of test case:

    cleanup
    file mkdir td1
    file mkdir td2
    testchmod 555 td2
    file rename -force td1 .
    file rename -force td2 .
    list [lsort [glob td*]] [file writable td1] [file
writable td2]

---- Result was:
{td1 td2} 1 1
---- Result should have been (exact matching):
{td1 td2} 1 0
==== fCmd-9.6 FAILED


==== fCmd-9.7 file rename: comprehensive: file to
existing file FAILED
==== Contents of test case:

    cleanup
    createfile tf1
    createfile tf2
    createfile tfs1
    createfile tfs2
    createfile tfs3
    createfile tfs4
    createfile tfd1
    createfile tfd2
    createfile tfd3
    createfile tfd4
    testchmod 444 tfs3
    testchmod 444 tfs4
    testchmod 444 tfd2
    testchmod 444 tfd4
    set msg [list [catch {file rename tf1 tf2} msg] $msg]
    file rename -force tfs1 tfd1
    file rename -force tfs2 tfd2
    file rename -force tfs3 tfd3
    file rename -force tfs4 tfd4
    list [lsort [glob tf*]] $msg [file writable tfd1]
[file writable tfd2] [file writable tfd3] [file
writable tfd4]

---- Result was:
{tf1 tf2 tfd1 tfd2 tfd3 tfd4} {1 {error renaming "tf1"
to "tf2": file already exists}} 1 1 1 1
---- Result should have been (exact matching):
{tf1 tf2 tfd1 tfd2 tfd3 tfd4} {1 {error renaming "tf1"
to "tf2": file already exists}} 1 1 0 0
==== fCmd-9.7 FAILED


==== fCmd-9.10 file rename: comprehensive: file to new
name and dir FAILED
==== Contents of test case:

    cleanup
    createfile tf1
    createfile tf2
    file mkdir td1
    testchmod 444 tf2
    file rename tf1 [file join td1 tf3]
    file rename tf2 [file join td1 tf4]
    list [catch {glob tf*}] [lsort [glob -directory td1
t*]]  [file writable [file join td1 tf3]] [file
writable [file join td1 tf4]]

---- Result was:
1 {td1/tf3 td1/tf4} 1 1
---- Result should have been (exact matching):
1 {td1/tf3 td1/tf4} 1 0
==== fCmd-9.10 FAILED


==== fCmd-10.2 file copy: comprehensive: file to new
name FAILED
==== Contents of test case:

    cleanup
    createfile tf1 tf1
    createfile tf2 tf2
    testchmod 444 tf2
    file copy tf1 tf3
    file copy tf2 tf4
    list [lsort [glob tf*]] [contents tf3] [contents
tf4] [file writable tf3] [file writable tf4]

---- Result was:
{tf1 tf2 tf3 tf4} tf1 tf2 1 1
---- Result should have been (exact matching):
{tf1 tf2 tf3 tf4} tf1 tf2 1 0
==== fCmd-10.2 FAILED


==== fCmd-10.4 file copy: comprehensive: file to
existing file FAILED
==== Contents of test case:

    cleanup
    createfile tf1
    createfile tf2
    createfile tfs1
    createfile tfs2
    createfile tfs3
    createfile tfs4
    createfile tfd1
    createfile tfd2
    createfile tfd3
    createfile tfd4
    testchmod 444 tfs3
    testchmod 444 tfs4
    testchmod 444 tfd2
    testchmod 444 tfd4
    set msg [list [catch {file copy tf1 tf2} msg] $msg]
    file copy -force tfs1 tfd1
    file copy -force tfs2 tfd2
    file copy -force tfs3 tfd3
    file copy -force tfs4 tfd4
    list [lsort [glob tf*]] $msg [file writable tfd1]
[file writable tfd2] [file writable tfd3] [file
writable tfd4]

---- Result was:
{tf1 tf2 tfd1 tfd2 tfd3 tfd4 tfs1 tfs2 tfs3 tfs4} {1
{error copying "tf1" to "tf2": file already exists}} 1
1 1 1
---- Result should have been (exact matching):
{tf1 tf2 tfd1 tfd2 tfd3 tfd4 tfs1 tfs2 tfs3 tfs4} {1
{error copying "tf1" to "tf2": file already exists}} 1
1 0 0
==== fCmd-10.4 FAILED


==== fCmd-10.6 file copy: comprehensive: dir to
non-empty dir FAILED
==== Contents of test case:

    cleanup
    file mkdir tds1
    file mkdir tds2
    file mkdir [file join tdd1 tds1 xxx]
    file mkdir [file join tdd2 tds2 xxx]
    testchmod 555 tds2
    set a1 [list [catch {file copy -force tds1 tdd1}
msg] $msg]
    set a2 [list [catch {file copy -force tds2 tdd2}
msg] $msg]
    list [lsort [glob td*]] $a1 $a2 [file writable
tds1] [file writable tds2]

---- Result was:
{tdd1 tdd2 tds1 tds2} {1 {error copying "tds1" to
"tdd1/tds1": file already exists}} {1 {error copying
"tds2" to "tdd2/tds2": file already exists}} 1 1
---- Result should have been (exact matching):
{tdd1 tdd2 tds1 tds2} {1 {error copying "tds1" to
"tdd1/tds1": file already exists}} {1 {error copying
"tds2" to "tdd2/tds2": file already exists}} 1 0
==== fCmd-10.6 FAILED


==== fCmd-10.7 file rename: comprehensive: file to new
name and dir FAILED
==== Contents of test case:

    cleanup
    createfile tf1
    createfile tf2
    file mkdir td1
    testchmod 444 tf2
    file copy tf1 [file join td1 tf3]
    file copy tf2 [file join td1 tf4]
    list [lsort [glob tf*]] [lsort [glob -directory td1
t*]]  [file writable [file join td1 tf3]] [file
writable [file join td1 tf4]]

---- Result was:
{tf1 tf2} {td1/tf3 td1/tf4} 1 1
---- Result should have been (exact matching):
{tf1 tf2} {td1/tf3 td1/tf4} 1 0
==== fCmd-10.7 FAILED


==== fCmd-12.8 renamefile: generic error FAILED
==== Contents of test case:

    catch {file delete -force -- tfa}
    file mkdir tfa
    file mkdir tfa/dir
    file attributes tfa -permissions 0555
    set result [catch {file rename tfa/dir tfa2}]
    file attributes tfa -permissions 0777
    file delete -force tfa
    set result

---- Result was:
0
---- Result should have been (exact matching):
1
==== fCmd-12.8 FAILED


==== fCmd-13.1 TclCopyFilesCmd: -force option FAILED
==== Contents of test case:

    catch {file delete -force -- tfa1}
    set s [createfile tfa1]
    file copy -force  tfa1 tfa2
    set result [expr [checkcontent tfa2 $s] &&
[checkcontent tfa1 $s]]
    file delete tfa1 tfa2
    set result

---- Test generated error; Return code was: 1
---- Return code should have been one of: 0 2
---- errorInfo: error deleting "tfa2": directory not empty
    while executing
"file delete tfa1 tfa2"
    ("uplevel" body line 6)
    invoked from within
"uplevel 1 $script"
---- errorCode: POSIX EEXIST {file already exists}
==== fCmd-13.1 FAILED


==== fCmd-13.2 TclCopyFilesCmd: -- option FAILED
==== Contents of test case:

    catch {file delete -force -- tfa1}
    set s [createfile -tfa1]
    file copy --  -tfa1 tfa2
    set result [expr [checkcontent tfa2 $s] && 
[checkcontent -tfa1 $s]]
    file delete -- -tfa1 tfa2
    set result

---- Test generated error; Return code was: 1
---- Return code should have been one of: 0 2
---- errorInfo: error deleting "tfa2": directory not empty
    while executing
"file delete -- -tfa1 tfa2"
    ("uplevel" body line 6)
    invoked from within
"uplevel 1 $script"
---- errorCode: POSIX EEXIST {file already exists}
==== fCmd-13.2 FAILED


==== fCmd-13.3 TclCopyFilesCmd: bad option FAILED
==== Contents of test case:

    catch {file delete -force -- tfa1}
    set s [createfile tfa1]
    set r1 [catch {file copy -x tfa1 tfa2}]
    set result [expr $r1 && [checkcontent tfa1 $s] &&
![file exists tfa2]]
    file delete tfa1
    set result

---- Result was:
0
---- Result should have been (exact matching):
1
==== fCmd-13.3 FAILED


==== fCmd-14.8 copyfile: copy directory failing FAILED
==== Contents of test case:

    catch {file delete -force -- tfa}
    file mkdir tfa/dir/a/b/c
    file attributes tfa/dir -permissions 0000
    set r1 [catch {file copy tfa tfa2}]
    file attributes tfa/dir -permissions 0777
    set result $r1
    file delete -force tfa tfa2
    set result

---- Result was:
0
---- Result should have been (exact matching):
1
==== fCmd-14.8 FAILED


==== fCmd-16.9 error while deleting file FAILED
==== Contents of test case:

    catch {file delete -force -- tfa}
    file mkdir tfa
    createfile tfa/a
    file attributes tfa -permissions 0555
    set result [catch  {file delete tfa/a }]
    #######
    #######  If any directory in a tree that is being
removed does not
    #######  have write permission, the process will fail!
    #######  This is also the case with "rm -rf"
    #######
    file attributes tfa -permissions 0777
    file delete -force tfa
    set result

---- Result was:
0
---- Result should have been (exact matching):
1
==== fCmd-16.9 FAILED


==== fCmd-17.1 mkdir stat failing on target but not
ENOENT FAILED
==== Contents of test case:

     catch {file delete -force -- tfa1}
     file mkdir tfa1
     file attributes tfa1 -permissions 0555
     set result [catch {file mkdir tfa1/tfa2}]
     file attributes tfa1 -permissions 0777
     file delete -force tfa1
     set result

---- Result was:
0
---- Result should have been (exact matching):
1
==== fCmd-17.1 FAILED


==== fCmd-19.2 rmdir error besides EEXIST FAILED
==== Contents of test case:

    catch {file delete -force -- tfa}
    file mkdir tfa
    file mkdir tfa/a
    file attributes tfa -permissions 0555
    set result [catch {file delete tfa/a}]
    file attributes tfa -permissions 0777
    file delete -force tfa
    set result

---- Result was:
0
---- Result should have been (exact matching):
1
==== fCmd-19.2 FAILED


==== fCmd-20.1 TraverseUnixTree : failure opening a
subdirectory directory FAILED
==== Contents of test case:

    catch {file delete -force -- tfa}
    file mkdir tfa
    file mkdir tfa/a
    file attributes tfa/a -permissions 0000
    set result [catch {file delete -force tfa}]
    file attributes tfa/a -permissions 0777
    file delete -force tfa
    set result

---- Test generated error; Return code was: 1
---- Return code should have been one of: 0 2
---- errorInfo: could not set permissions for file
"tfa/a": no such file or directory
    while executing
"file attributes tfa/a -permissions 0777"
    ("uplevel" body line 7)
    invoked from within
"uplevel 1 $script"
---- errorCode: POSIX ENOENT {no such file or directory}
==== fCmd-20.1 FAILED

fileName.test
[...]
socket.test

==== socket-5.1 byte order problems, socket numbers,
htons FAILED
==== Contents of test case:

    set x {couldn't open socket: not owner}
    if {![catch {socket -server dodo 0x1} msg]} {
        set x {htons problem, should be disallowed, are
you running as SU?}
        close $msg
    }
    set x

---- Result was:
htons problem, should be disallowed, are you running as SU?
---- Result should have been (exact matching):
couldn't open socket: not owner
==== socket-5.1 FAILED

source.test
[...]
stack.test

==== stack-3.1 enough room for regexp near recursion
limit FAILED
==== Contents of test case:

    # do this in a sub process in case it segfaults
    exec [interpreter] << {
        interp recursionlimit {} 10000
        set depth 0
        proc a { max } {
            if { [info level] < $max } {
                set ::depth [info level]
                a $max
            } else {
                regexp {^ ?} x
            }
        }
        catch { a 10001 }
        set depth2 $depth
        puts [list [a $depth] [expr { $depth2 - $depth }]]
    }

---- Test generated error; Return code was: 1
---- Return code should have been one of: 0 2
---- errorInfo: child killed: segmentation violation
    while executing
"exec [interpreter] << {
        interp recursionlimit {} 10000
        set depth 0
        proc a { max } {
            if { [info level] < $max } {
                set ::depth [info level]
                ..."
    ("uplevel" body line 3)
    invoked from within
"uplevel 1 $script"
---- errorCode: CHILDKILLED 6282 SIGSEGV {segmentation
violation}
==== stack-3.1 FAILED

Test file error: WARNING: the default application
stacksize of 2044 may cause Tcl to
crash due to stack overflow before the recursion limit
is reached.
A minimum stacksize of 2400 kbytes is recommended.
Skipping infinite recursion test.
string.test
[...]
switch.test
tcltest.test

==== tcltest-8.3 tcltest a.tcl -tmpdir notReadableDir
FAILED
==== Contents of test case:

    slave msg $a -tmpdir $notReadableDir 
    string match {*not readable*} $msg

---- Result was:
0
---- Result should have been (exact matching):
1
==== tcltest-8.3 FAILED


==== tcltest-8.4 tcltest a.tcl -tmpdir notWriteableDir
FAILED
==== Contents of test case:

    slave msg $a -tmpdir $notWriteableDir
    string match {*not writeable*} $msg

---- Result was:
0
---- Result should have been (exact matching):
1
==== tcltest-8.4 FAILED


==== tcltest-8.12 tcltest a.tcl -testdir notReadableDir
FAILED
==== Contents of test case:

    slave msg $a -testdir $notReadableDir 
    string match {*not readable*} $msg

---- Result was:
0
---- Result should have been (exact matching):
1
==== tcltest-8.12 FAILED

thread.test
[...]
trace.test
unixFCmd.test

==== unixFCmd-1.1 TclpRenameFile: EACCES FAILED
==== Contents of test case:

    cleanup
    file mkdir td1/td2/td3
    file attributes td1/td2 -permissions 0000
    set msg [list [catch {file rename td1/td2/td3 td2}
msg] $msg]
    file attributes td1/td2 -permissions 0755
    set msg

---- Result was:
0 {}
---- Result should have been (exact matching):
1 {error renaming "td1/td2/td3": permission denied}
==== unixFCmd-1.1 FAILED


==== unixFCmd-1.7 TclpRenameFile: EXDEV FAILED
==== Contents of test case:

    cleanup
    file mkdir foo/bar
    file attr foo -perm 040555
    set catchResult [catch {file rename foo/bar /tmp} msg]
    set msg [lindex [split $msg :] end]
    catch {file delete /tmp/bar}
    catch {file attr foo -perm 040777}
    catch {file delete -force foo}
    list $catchResult $msg

---- Result was:
0 {}
---- Result should have been (exact matching):
1 { permission denied}
==== unixFCmd-1.7 FAILED

unixFile.test
[...]
User Comments:
dkf added on 2006-07-10 07:35:00:
Logged In: YES 
user_id=79902

Do not run the test suite as root.

dgp: Suggest these tests have a constraint added to stop
them from being run as root? They're nonsensical when that
happens.

pierre42 added on 2006-07-10 22:00:04:
Logged In: YES 
user_id=512388

I think that it would be a great idea.

dgp added on 2006-07-10 22:35:08:
Logged In: YES 
user_id=80530


The tcltest package already
offers the "root" and "notRoot"
constraints.  Test suite authors
should use them where appropriate.

sf-robot added on 2008-01-28 10:20:10:
Logged In: YES 
user_id=1312539
Originator: NO

This Tracker item was closed automatically by the system. It was
previously set to a Pending status, and the original submitter
did not respond within 14 days (the time period specified by
the administrator of this Tracker).