Tcl Source Code

View Ticket
Login
Ticket UUID: 575860
Title: iogt.test needs writable .
Type: Bug Version: obsolete: 8.4a5
Submitter: dgp Created on: 2002-07-01 07:29:31
Subsystem: 26. Channel Transforms Assigned To: andreas_kupries
Priority: 5 Medium Severity:
Status: Closed Last Modified: 2002-07-04 22:52:11
Resolution: Fixed Closed By: andreas_kupries
    Closed on: 2002-07-04 15:52:11
Description:
See Tcl Bug 575817.

iogt.test has similar problems:

==== iogt-1.1 stack/unstack FAILED
==== Contents of test case:

    set fh [open dummy r]
    identity -attach $fh
    testchannel unstack $fh
    close   $fh

---- Result was:
couldn't open "dummy": no such file or directory
---- Result should have been (exact matching):

---- Test generated error; Return code was: 1
---- Return code should have been one of: 0 2
==== iogt-1.1 FAILED


==== iogt-1.2 stack/close FAILED
==== Contents of test case:

    set fh [open dummy r]
    identity -attach $fh
    close   $fh

---- Result was:
couldn't open "dummy": no such file or directory
---- Result should have been (exact matching):

---- Test generated error; Return code was: 1
---- Return code should have been one of: 0 2
==== iogt-1.2 FAILED


==== iogt-1.3 stack/unstack, configuration, options FAILED
==== Contents of test case:

    set fh [open dummy r]
    set ca [asort [fconfigure $fh]]
    identity -attach $fh
    set cb [asort [fconfigure $fh]]
    testchannel unstack $fh
    set cc [asort [fconfigure $fh]]
    close $fh

    # With this system none of the buffering,
translation and
    # encoding option may change their values with channels
    # stacked upon each other or not.

    # cb == ca == cc

    list [string equal $ca $cb] [string equal $cb $cc]
[string equal $ca $cc]

---- Result was:
couldn't open "dummy": no such file or directory
---- Result should have been (exact matching):
1 1 1
---- Test generated error; Return code was: 1
---- Return code should have been one of: 0 2
==== iogt-1.3 FAILED


==== iogt-1.4 stack/unstack, configuration FAILED
==== Contents of test case:

    set fh [open dummy r]
    set ca [asort [fconfigure $fh]]
    identity -attach $fh
    fconfigure $fh  -buffering   line  -translation cr
   -encoding    shiftjis     testchannel unstack $fh
    set cc [asort [fconfigure $fh]]

    set res [list  [string equal $ca $cc]   
[fconfigure $fh -buffering]   [fconfigure $fh
-translation]  [fconfigure $fh -encoding]     ]

    close $fh
    set res

---- Result was:
couldn't open "dummy": no such file or directory
---- Result should have been (exact matching):
0 line cr shiftjis
---- Test generated error; Return code was: 1
---- Return code should have been one of: 0 2
==== iogt-1.4 FAILED


==== iogt-2.0 basic I/O going through transform FAILED
==== Contents of test case:

    set fin  [open dummy    r]
    set fout [open dummyout w]

    identity -attach $fin
    identity -attach $fout

    fcopy $fin $fout

    close $fin
    close $fout

    set fin  [open dummy    r]
    set fout [open dummyout r]

    set res     [string equal [set in [read $fin]] [set
out [read $fout]]]
    lappend res [string length $in] [string length $out]

    close $fin
    close $fout

    set res

---- Result was:
couldn't open "dummy": no such file or directory
---- Result should have been (exact matching):
1 71 71
---- Test generated error; Return code was: 1
---- Return code should have been one of: 0 2
==== iogt-2.0 FAILED


==== iogt-2.1 basic I/O, operation trail FAILED
==== Contents of test case:

    set fin  [open dummy    r]
    set fout [open dummyout w]

    set ain [list] ; set aout [list]
    audit_ops ain  -attach $fin
    audit_ops aout -attach $fout

    fconfigure $fin  -buffersize 10
    fconfigure $fout -buffersize 5

    fcopy $fin $fout

    close $fin
    close $fout

    set res "[join $ain \n]\n--------\n[join $aout \n]"

---- Result was:
couldn't open "dummy": no such file or directory
---- Result should have been (exact matching):
create/read
query/maxRead
read
query/maxRead
read
query/maxRead
read
query/maxRead
read
query/maxRead
read
query/maxRead
read
query/maxRead
read
query/maxRead
read
query/maxRead
flush/read
delete/read
--------
create/write
write
write
write
write
write
write
write
write
flush/write
delete/write
---- Test generated error; Return code was: 1
---- Return code should have been one of: 0 2
==== iogt-2.1 FAILED


==== iogt-2.2 basic I/O, data trail FAILED
==== Contents of test case:

    set fin  [open dummy    r]
    set fout [open dummyout w]

    set ain [list] ; set aout [list]
    audit_flow ain  -attach $fin
    audit_flow aout -attach $fout

    fconfigure $fin  -buffersize 10
    fconfigure $fout -buffersize 5

    fcopy $fin $fout

    close $fin
    close $fout

    set res "[join $ain \n]\n--------\n[join $aout \n]"

---- Result was:
couldn't open "dummy": no such file or directory
---- Result should have been (exact matching):
create/read {} *ignored*
query/maxRead {} -1
read abcdefghij abcdefghij
query/maxRead {} -1
read klmnopqrst klmnopqrst
query/maxRead {} -1
read uvwxyz0123 uvwxyz0123
query/maxRead {} -1
read 456789,./? 456789,./?
query/maxRead {} -1
read {><;'\|":[]} {><;'\|":[]}
query/maxRead {} -1
read {\}\{`~!@#$} {\}\{`~!@#$}
query/maxRead {} -1
read %^&*()_+-= %^&*()_+-=
query/maxRead {} -1
read {
} {
}
query/maxRead {} -1
flush/read {} {}
delete/read {} *ignored*
--------
create/write {} *ignored*
write abcdefghij abcdefghij
write klmnopqrst klmnopqrst
write uvwxyz0123 uvwxyz0123
write 456789,./? 456789,./?
write {><;'\|":[]} {><;'\|":[]}
write {\}\{`~!@#$} {\}\{`~!@#$}
write %^&*()_+-= %^&*()_+-=
write {
} {
}
flush/write {} {}
delete/write {} *ignored*
---- Test generated error; Return code was: 1
---- Return code should have been one of: 0 2
==== iogt-2.2 FAILED


==== iogt-2.3 basic I/O, mixed trail FAILED
==== Contents of test case:

    set fin  [open dummy    r]
    set fout [open dummyout w]

    set trail [list]
    audit_flow trail -attach $fin
    audit_flow trail -attach $fout

    fconfigure $fin  -buffersize 20
    fconfigure $fout -buffersize 10

    fcopy $fin $fout

    close $fin
    close $fout

    join $trail \n

---- Result was:
couldn't open "dummy": no such file or directory
---- Result should have been (exact matching):
create/read {} *ignored*
create/write {} *ignored*
query/maxRead {} -1
read abcdefghijklmnopqrst abcdefghijklmnopqrst
write abcdefghij abcdefghij
write klmnopqrst klmnopqrst
query/maxRead {} -1
read uvwxyz0123456789,./? uvwxyz0123456789,./?
write uvwxyz0123 uvwxyz0123
write 456789,./? 456789,./?
query/maxRead {} -1
read {><;'\|":[]\}\{`~!@#$} {><;'\|":[]\}\{`~!@#$}
write {><;'\|":[]} {><;'\|":[]}
write {\}\{`~!@#$} {\}\{`~!@#$}
query/maxRead {} -1
read {%^&*()_+-=
} {%^&*()_+-=
}
query/maxRead {} -1
flush/read {} {}
write %^&*()_+-= %^&*()_+-=
write {
} {
}
delete/read {} *ignored*
flush/write {} {}
delete/write {} *ignored*
---- Test generated error; Return code was: 1
---- Return code should have been one of: 0 2
==== iogt-2.3 FAILED


==== iogt-6.0 Push back FAILED
==== Contents of test case:

    set f [open dummy r]

    # contents of dummy = "abcdefghi..."
    read $f 3 ; # skip behind "abc"

    constx -attach $f

    # expect to get "xxx" from the transform because
    # of unread "def" input to transform which returns
"xxx".
    #
    # Actually the IO layer pre-read the whole file and
will
    # read "def" directly from the buffer without bothering
    # to consult the newly stacked transformation. This is
    # wrong.

    set res [read $f 3]
    close $f
    set res

---- Result was:
couldn't open "dummy": no such file or directory
---- Result should have been (exact matching):
xxx
---- Test generated error; Return code was: 1
---- Return code should have been one of: 0 2
==== iogt-6.0 FAILED
User Comments: andreas_kupries added on 2002-07-04 22:52:11:
Logged In: YES 
user_id=75003

Patch committed to head.

dgp added on 2002-07-04 02:46:01:
Logged In: YES 
user_id=80530


looks good.  make it so.

andreas_kupries added on 2002-07-04 02:13:33:

File Added - 26349: 575860.diff

Logged In: YES 
user_id=75003

Patch fixing the problem for me. Back to Don for test in his 
environment.

Attachments: