Tcl Source Code

View Ticket
Login
Ticket UUID: 964270
Title: new iogt.test failures
Type: Bug Created on: 2004-06-01 13:31:30
Submitter: dgp Assigned to: davygrvy
Subsystem: 26. Channel Transforms Severity:
Priority: 8 Last modified: 2004-06-02 02:15:33
Status: Closed Closed by: davygrvy
Resolution: Fixed Closed on: 2004-06-01 19:15:33
Version: obsolete: 8.5a2
Description:
==== iogt-2.1 basic I/O, operation trail FAILED
==== Contents of test case:

    set fin  [open $path(dummy)    r]
    set fout [open $path(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]"

---- Test generated error; Return code was: 1
---- Return code should have been one of: 0 2
---- errorInfo: bad value for -buffersize: must not be
less than 10 or greater than 1Mbyte.
    while executing
"fconfigure $fout -buffersize 5"
    ("uplevel" body line 10)
    invoked from within
"uplevel 1 $script"
---- errorCode: NONE
==== iogt-2.1 FAILED

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

    set fin  [open $path(dummy)    r]
    set fout [open $path(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]"

---- Test generated error; Return code was: 1
---- Return code should have been one of: 0 2
---- errorInfo: bad value for -buffersize: must not be
less than 10 or greater than 1Mbyte.
    while executing
"fconfigure $fout -buffersize 5"
    ("uplevel" body line 10)
    invoked from within
"uplevel 1 $script"
---- errorCode: NONE
==== iogt-2.2 FAILED
User Comments:
andreas_kupries added on 2004-06-01 22:06:55:
Logged In: YES 
user_id=75003

Reassigned to david, this seems to originate in his latest
changes.

davygrvy added on 2004-06-02 00:28:33:
Logged In: YES 
user_id=7549

Those buffersizes are invalid.  I'll fix the test suite.

dgp added on 2004-06-02 00:30:33:
Logged In: YES 
user_id=80530

I'd still like to see the change
reverted.  Who knows how many
scripts depend on silent truncation
of buffersize requests outside
the valid range?

davygrvy added on 2004-06-02 00:40:43:
Logged In: YES 
user_id=7549

depending on silent behavior is a dangerous dependancy.

Try this, then scratch your head why:
fconfigure stdout -buffersize 0x400

dgp added on 2004-06-02 00:53:41:
Logged In: YES 
user_id=80530

Ah, I see.  I'm fine with the
conversion to use Tcl_GetInt
and the error reporting when
a non-integer value is provided.

I'm opposed to the removal
of silent range truncation only.
That would take care of the tests,
and any semi-sensible scripts.

I don't want to add hard errors
on buffersizes outside the limits
mostly because it's not clear to
me why the limits are imposed
in the first place.  I'd rather not
enshrine them.

dgp added on 2004-06-02 00:59:39:
Logged In: YES 
user_id=80530

see RFE 558932

davygrvy added on 2004-06-02 01:22:38:
Logged In: YES 
user_id=7549

I'll pull-out the range verification, and revert the test suite 
mods I just did, but leave the Tcl_GetInt in place of atoi.

The silent truncation still scares me.

davygrvy added on 2004-06-02 02:15:33:
Logged In: YES 
user_id=7549

test suite returned to "as before", failures fixed.