Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 4fcb0d38aa18266f0701af3465dfc13cd9439b1b
Ticket: 219388ffffffffffffffffffffffffffffffffff
socket tests (12.*) use exec but don't check return status -
User & Date: nobody on 2000-10-26 05:12:09
Changes

  1. assignee changed to: "nobody"
  2. cmimetype changed to: "text/plain"
  3. comment changed to:
    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.
    
    
    
    
    
  4. foundin changed to: "obsolete: 8.3"
  5. priority changed to: "5 Medium"
  6. resolution changed to: "None"
  7. status changed to: "Open"
  8. submitter changed to: "nobody"
  9. subsystem changed to: "85. tclconfig"
  10. title changed to:
    socket tests (12.*) use exec but don't check return status -
    
  11. type changed to: "Bug"