socket tests (12.*) use exec but don't check return status -
Closed / Out of Date219388ffffffffffffffffffffffffffffffffffCreated 26 years agoUpdated 25 years ago
Descriptionplain2000-10-26 05:12:09
OriginalBugID: 6133 Bug
Version: 8.3
SubmitDate: '2000-08-14'
LastModified: '2000-08-14'
Severity: SER
Status: UnAssn
Submitter: jenn
ChangedBy: jenn
OS: All
FixedDate: '2000-10-25'
ClosedDate: '2000-10-25'
In socket.test, many of the socket tests use exec. catch isn't used on these calls, but the fact that they ran is essential for the proper running of the tests. Tests can silently fail because of this.
Easy fix:
Modify the "exec ..." calls so that the errors are caught (if any exist) and return them if they're relevant.
to reproduce:
1) look for the following code in socket.test:
set f [open script2 w]
puts $f [list set tcltest [tcltest::nameofexecutable]]
puts $f {
set f [socket -server accept 2828]
proc accept { file addr port } {
close $file
}
>>>exec $tcltest script1 &
close $f
after 1000 exit
vwait forever
}
close $f
# Launch script2 and wait 5 seconds
exec [tcltest::nameofexecutable] script2 &
2) Change "exec $tcltest script1" (marked by ">>>" above) to "exec foobar".
3) Run socket.test
expected result:
failure reported
actual result:
test silently fails. error goes to the console. test assumes that what it expected to happen happened.
This test coding error is apparent in several of the socket tests, including most of the socket-12.* tests.
dkf Ticket [219388ffff]: 1 change
[History diff]2001-02-07 22:21:27
dgp Ticket [219388ffff]: 1 change
[History diff]2001-04-01 01:47:30
hobbsplain2001-10-17 05:38:50
Logged In: YES user_id=72656 The test have been updated, and I don't think this is really relevant any more. I'm changing it to pending, unless someone wants to object.
Log in (anonymous is fine) to add a comment.