==== socket_inet6-12.2 testing inheritance of client sockets FAILED
==== Contents of test case:
# Create the server socket
set server [socket -server accept -myaddr $localhost 0]
proc accept { file host port } {
# When the client connects, establish the read handler
global server
close $server
fileevent $file readable [list getdata $file]
fconfigure $file -buffering line -blocking 0
}
proc getdata { file } {
# Read handler on the accepted socket.
global x failed
set status [catch {read $file} data]
if {$status != 0} {
set x {read failed, error was $data}
catch { close $file }
} elseif {$data ne ""} {
} elseif {[fblocked $file]} {
} elseif {[eof $file]} {
if {$failed} {
set x {client socket was inherited}
} else {
set x {client socket was not inherited}
}
catch { close $file }
} else {
set x {impossible case}
catch { close $file }
}
}
# Launch the script2 process
### exec [interpreter] script2 &
set p [open "|[list [interpreter] $path(script2)]" w]
puts $p [lindex [fconfigure $server -sockname] 2] ; flush $p
vwait x
return $x
---- Result was:
client socket was inherited
---- Result should have been (exact matching):
client socket was not inherited
==== socket_inet6-12.2 FAILED
Sometimes fails; sometimes does not.
Suspect the tightening of some timeouts
overshot a bit.
|