Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 319acd4b813f13df4b204be77bea8a52b60e0291
Ticket: 218863ffffffffffffffffffffffffffffffffff
When compiling on Windows NT 4.0 test set fails in socket.te
User & Date: nobody on 2000-10-26 01:06:52
Changes

  1. assignee changed to: "nobody"
  2. cmimetype changed to: "text/plain"
  3. comment changed to:
    OriginalBugID: 2452 Bug
    SubmitDate: '1999-07-28'
    LastModified: '1999-08-04'
    Severity: LOW
    Status: Released
    Submitter: techsupp
    ChangedBy: hobbs
    OS: Windows NT
    Machine: X86
    FixedDate: '1999-08-04'
    ClosedDate: '2000-10-25'
    
    
    Name:
    Lindsay Gill
    
    ReproducibleScript:
    When compiling 'test' from makefile the compilation fails at socket.test
    
    ObservedBehavior:
    socket.test
        ==== socket-2.1 tcp connection FAILED
        ==== Contents of test case:
            removeFile script
            set f [open script w]
            puts $f {
         set timer [after 2000 "set x timed_out"]
         set f [socket -server accept 2828]
         proc accept {file addr port} {
             global x
             set x done
                    close $file
         }
         puts ready
         vwait x
         after cancel $timer
         close $f
         puts $x
            }
            close $f
            set f [open "|[list $tcltest script]" r]
            gets $f x
            if {[catch {socket 127.0.0.1 2828} msg]} {
                set x $msg
            } else {
                lappend x [gets $f]
                close $msg
            }
            lappend x [gets $f]
            close $f
            set x
        ---- Result was:
        ready timed_out {}
        ---- Result should have been:
        ready done {}
        ==== socket-2.1 FAILED
        ==== socket-2.2 tcp connection with client port specified FAILED
        ==== Contents of test case:
            removeFile script
            set f [open script w]
            puts $f {
         set timer [after 2000 "set x done"]
                set f [socket -server accept 2829]
         proc accept {file addr port} {
                    global x
                    puts "[gets $file] $port"
                    close $file
                    set x done
         }
         puts ready
         vwait x
         after cancel $timer
         close $f
            }
            close $f
            set f [open "|[list $tcltest script]" r]
            gets $f x
            global port
            if {[catch {socket -myport $port 127.0.0.1 2829} sock]} {
                set x $sock
         close [socket 127.0.0.1 2829]
         puts stderr $sock
            } else {
                puts $sock hello
         flush $sock
                lappend x [gets $f]
                close $sock
            }
            close $f
            set x
        ---- Result was:
        ready {}
        ---- Result should have been:
        ready {hello 2110}
        ==== socket-2.2 FAILED
        ==== socket-2.3 tcp connection with client interface specified FAILED
        ==== Contents of test case:
            removeFile script
            set f [open script w]
            puts $f {
         set timer [after 2000 "set x done"]
                set f [socket  -server accept 2830]
         proc accept {file addr port} {
                    global x
                    puts "[gets $file] $addr"
                    close $file
                    set x done
         }
         puts ready
         vwait x
         after cancel $timer
         close $f
            }
            close $f
            set f [open "|[list $tcltest script]" r]
            gets $f x
            if {[catch {socket -myaddr 127.0.0.1 127.0.0.1 2830} sock]} {
                set x $sock
            } else {
                puts $sock hello
         flush $sock
                lappend x [gets $f]
                close $sock
            }
            close $f
            set x
        ---- Result was:
        ready {}
        ---- Result should have been:
        ready {hello 127.0.0.1}
        ==== socket-2.3 FAILED
        ==== socket-2.4 tcp connection with server interface specified FAILED
        ==== Contents of test case:
            removeFile script
            set f [open script w]
            puts $f {
         set timer [after 2000 "set x done"]
                set f [socket -server accept -myaddr [info hostname] 2831]
         proc accept {file addr port} {
                    global x
                    puts "[gets $file]"
                    close $file
                    set x done
         }
         puts ready
         vwait x
         after cancel $timer
         close $f
            }
            close $f
            set f [open "|[list $tcltest script]" r]
            gets $f x
            if {[catch {socket [info hostname] 2831} sock]} {
                set x $sock
            } else {
                puts $sock hello
         flush $sock
                lappend x [gets $f]
                close $sock
            }
            close $f
            set x
        ---- Result was:
        ready {}
        ---- Result should have been:
        ready hello
        ==== socket-2.4 FAILED
        ==== socket-2.5 tcp connection with redundant server port FAILED
        ==== Contents of test case:
            removeFile script
            set f [open script w]
            puts $f {
         set timer [after 2000 "set x done"]
                set f [socket -server accept 2832]
         proc accept {file addr port} {
                    global x
                    puts "[gets $file]"
                    close $file
                    set x done
         }
         puts ready
         vwait x
         after cancel $timer
         close $f
            }
            close $f
            set f [open "|[list $tcltest script]" r]
            gets $f x
            if {[catch {socket 127.0.0.1 2832} sock]} {
                set x $sock
            } else {
                puts $sock hello
         flush $sock
                lappend x [gets $f]
                close $sock
            }
            close $f
            set x
        ---- Result was:
        ready {}
        ---- Result should have been:
        ready hello
        ==== socket-2.5 FAILED
        ==== socket-2.10 close on accept, accepted socket lives FAILED
        ==== Contents of test case:
            set done 0
            set timer [after 20000 "set done timed_out"]
            set ss [socket -server accept 2830]
            proc accept {s a p} {
         global ss
         close $ss
         fileevent $s readable "readit $s"
         fconfigure $s -trans lf
            }
            proc readit {s} {
         global done
         gets $s
         close $s
         set done 1
            }
            set cs [socket [info hostname] 2830]
            puts $cs hello
            close $cs
            vwait done
            after cancel $timer
            set done
        ---- Result was:
        timed_out
        ---- Result should have been:
        1
        ==== socket-2.10 FAILED
        ==== socket-6.1 accept callback error FAILED
        ==== Contents of test case:
            removeFile script
            set f [open script w]
            puts $f {
         gets stdin
         socket 127.0.0.1 2848
            }
            close $f
            set f [open "|[list $tcltest script]" r+]
            proc bgerror args {
         global x
         set x $args
            }
            proc accept {s a p} {expr 10 / 0}
            set s [socket -server accept 2848]
            puts $f hello
            close $f
            set timer [after 10000 "set x timed_out"]
            vwait x
            after cancel $timer
            close $s
            rename bgerror {}
            set x
        ---- Result was:
        timed_out
        ---- Result should have been:
        {divide by zero}
        ==== socket-6.1 FAILED
        ==== socket-7.4 testing socket specific options FAILED
        ==== Contents of test case:
            set s [socket -server accept 2823]
            proc accept {s a p} {
         global x
         set x [fconfigure $s -sockname]
         close $s
            }
            set s1 [socket [info hostname] 2823]
            set timer [after 10000 "set x timed_out"]
            vwait x
            after cancel $timer
            close $s
            close $s1
            set l ""
            lappend l [lindex $x 2] [llength $x]
        ---- Result was:
        {} 1
        ---- Result should have been:
        2823 3
        ==== socket-7.4 FAILED
        ==== socket-7.5 testing socket specific options FAILED
        ==== Contents of test case:
            set s [socket -server accept 2829]
            proc accept {s a p} {
         global x
         set x [fconfigure $s -sockname]
         close $s
            }
            set s1 [socket 127.0.0.1 2829]
            set timer [after 10000 "set x timed_out"]
            vwait x
            after cancel $timer
            close $s
            close $s1
            set l ""
            lappend l [lindex $x 0] [lindex $x 2] [llength $x]
        ---- Result was:
        timed_out {} 1
        ---- Result should have been:
        127.0.0.1 2829 3
        ==== socket-7.5 FAILED
        ==== socket-9.1 testing spurious events FAILED
        ==== Contents of test case:
            set len 0
            set spurious 0
            set done 0
            proc readlittle {s} {
         global spurious done len
         set l [read $s 1]
         if {[string length $l] == 0} {
             if {![eof $s]} {
          incr spurious
             } else {
          close $s
          set done 1
             }
         } else {
             incr len [string length $l]
         }
            }
            proc accept {s a p} {
         fconfigure $s -buffering none -blocking off
         fileevent $s readable [list readlittle $s]
            }
            set s [socket -server accept 2831]
            set c [socket [info hostname] 2831]
            puts -nonewline $c
        01234567890123456789012345678901234567890123456789
            close $c
            set timer [after 10000 "set done timed_out"]
            vwait done
            after cancel $timer
            close $s
            list $spurious $len
        ---- Result was:
        0 0
        ---- Result should have been:
        0 50
        ==== socket-9.1 FAILED
        ==== socket-9.2 testing async write, fileevents, flush on close FAILED
        ==== Contents of test case:
            set firstblock ""
            for {set i 0} {$i < 5} {incr i} {set firstblock
        "a$firstblock$firstblock"}
            set secondblock ""
            for {set i 0} {$i < 16} {incr i} {
         set secondblock "b$secondblock$secondblock"
            }
            set l [socket -server accept 2832]
            proc accept {s a p} {
         fconfigure $s -blocking 0 -translation lf -buffersize 16384  -buffering
        line
         fileevent $s readable "readable $s"
            }
            proc readable {s} {
         set l [gets $s]
         fileevent $s readable {}
         after 1000 respond $s
            }
            proc respond {s} {
         global firstblock
         puts -nonewline $s $firstblock
         after 1000 writedata $s
            }
            proc writedata {s} {
         global secondblock
         puts -nonewline $s $secondblock
         close $s
            }
            set s [socket [info hostname] 2832]
            fconfigure $s -blocking 0 -trans lf -buffering line
            set count 0
            puts $s hello
            proc readit {s} {
         global count done
         set l [read $s]
         incr count [string length $l]
         if {[eof $s]} {
             close $s
             set done 1
         }
            }
            fileevent $s readable "readit $s"
            set timer [after 10000 "set done timed_out"]
            vwait done
            after cancel $timer
            close $l
            set count
        ---- Result was:
        0
        ---- Result should have been:
        65566
        ==== socket-9.2 FAILED
        ==== socket-9.3 testing EOF stickyness FAILED
        ==== Contents of test case:
            proc count_to_eof {s} {
         global count done timer
         set l [gets $s]
         if {[eof $s]} {
             incr count
             if {$count > 9} {
          close $s
          set done true
          set count {eof is sticky}
          after cancel $timer
             }
         }
            }
            proc timerproc {} {
         global done count c
         set done true
         set count {timer went off, eof is not sticky}
         close $c
            } 
            set count 0
            set done false
            proc write_then_close {s} {
         puts $s bye
         close $s
            }
            proc accept {s a p} {
         fconfigure $s -buffering line -translation lf
         fileevent $s writable "write_then_close $s"
            }
            set s [socket -server accept 2833]
            set c [socket [info hostname] 2833]
            fconfigure $c -blocking off -buffering line -translation lf
            fileevent $c readable "count_to_eof $c"
            set timer [after 1000 timerproc]
            vwait done
            close $s
            set count
        ---- Result was:
        timer went off, eof is not sticky
        ---- Result should have been:
        eof is sticky
        ==== socket-9.3 FAILED
    
    
    
    This appears to be an 8.1 problem (not specified by user).  This
    passes on 8.2b2. 
    -- 08/04/1999 hobbs
    
  4. foundin changed to: "obsolete: 8.4a3"
  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: "69. Other"
  10. title changed to:
    When compiling on Windows NT 4.0 test set fails in socket.te
    
  11. type changed to: "Bug"