Tcl Source Code

Check-in [ee4b5c6c43]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Test iogt-2.4 is another segfault demo for [721ec69271].
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | core-8-5-branch
Files: files | file ages | folders
SHA1: ee4b5c6c43a0c1ba94a2d6911900594beb1c7f00
User & Date: dgp 2014-03-27 16:44:04
Context
2014-03-27
19:14
Test iocmd-23.11 demos another segfault. check-in: d237824bfd user: dgp tags: core-8-5-branch
16:47
Test iogt-2.4 is another segfault demo for [721ec69271]. check-in: b83734f724 user: dgp tags: trunk
16:44
Test iogt-2.4 is another segfault demo for [721ec69271]. check-in: ee4b5c6c43 user: dgp tags: core-8-5-branch
2014-03-20
10:06
Fix [2f7cbd01c3]: tcl8.6.1 fails to build on FreeBSD 10.0 check-in: b5fb55f2fe user: jan.nijtmans tags: core-8-5-branch
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to tests/iogt.test.

237
238
239
240
241
242
243




















244
245
246
247
248
249
250

    #catch {puts stdout "\t>* $res" ; flush stdout}
    #catch {puts stdout "x$res"} msg

    lappend trail [list $op $data $res]
    return $res
}





















proc counter {var op data} {
    variable $var
    upvar 0 $var n

    switch -- $op {
	create/write -	create/read  -







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270

    #catch {puts stdout "\t>* $res" ; flush stdout}
    #catch {puts stdout "x$res"} msg

    lappend trail [list $op $data $res]
    return $res
}

proc id_torture {chan op data} {
    switch -- $op {
	create/write -
	create/read  -
	delete/write -
	delete/read  -
	clear_read   {;#ignore}
	flush/write -
	flush/read  -
	write       -
	read        {
	    testchannel unstack $chan
	    testchannel transform $chan \
		-command [namespace code [list id_torture $chan]]
	    return $data
	}
	query/maxRead {return -1}
    }
}

proc counter {var op data} {
    variable $var
    upvar 0 $var n

    switch -- $op {
	create/write -	create/read  -
359
360
361
362
363
364
365




366
367
368
369
370
371
372
proc audit_ops {var -attach channel} {
    testchannel transform $channel -command [namespace code [list id_optrail $var]]
}

proc audit_flow {var -attach channel} {
    testchannel transform $channel -command [namespace code [list id_fulltrail $var]]
}





proc stopafter {var n -attach channel} {
    variable $var
    upvar 0 $var vn
    set vn $n
    testchannel transform $channel -command [namespace code [list counter $var]]
}







>
>
>
>







379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
proc audit_ops {var -attach channel} {
    testchannel transform $channel -command [namespace code [list id_optrail $var]]
}

proc audit_flow {var -attach channel} {
    testchannel transform $channel -command [namespace code [list id_fulltrail $var]]
}

proc torture {-attach channel} {
    testchannel transform $channel -command [namespace code [list id_torture $channel]]
}

proc stopafter {var n -attach channel} {
    variable $var
    upvar 0 $var vn
    set vn $n
    testchannel transform $channel -command [namespace code [list counter $var]]
}
628
629
630
631
632
633
634









635
636
637
638
639
640
641
write {
} {
}
delete/read {} *ignored*
flush/write {} {}
delete/write {} *ignored*}











test iogt-3.0 {Tcl_Channel valid after stack/unstack, fevent handling} \
	{testchannel unknownFailure} {
    # This test to check the validity of aquired Tcl_Channel references is
    # not possible because even a backgrounded fcopy will immediately start
    # to copy data, without waiting for the event loop. This is done only in
    # case of an underflow on the read size!. So stacking transforms after the







>
>
>
>
>
>
>
>
>







652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
write {
} {
}
delete/read {} *ignored*
flush/write {} {}
delete/write {} *ignored*}

test iogt-2.4 {basic I/O, mixed trail} {testchannel} {
    set fh [open $path(dummy) r]
    torture -attach $fh
    chan configure $fh -buffersize 2
    set x [read $fh]
    testchannel unstack $fh
    close   $fh
    set x
} {}

test iogt-3.0 {Tcl_Channel valid after stack/unstack, fevent handling} \
	{testchannel unknownFailure} {
    # This test to check the validity of aquired Tcl_Channel references is
    # not possible because even a backgrounded fcopy will immediately start
    # to copy data, without waiting for the event loop. This is done only in
    # case of an underflow on the read size!. So stacking transforms after the