summaryrefslogtreecommitdiffstats
path: root/tests/socket.test
diff options
context:
space:
mode:
authoroehhar <harald.oehlmann@elmicron.de>2014-04-08 14:40:20 (GMT)
committeroehhar <harald.oehlmann@elmicron.de>2014-04-08 14:40:20 (GMT)
commit207329f22a7bf020db137dc4e6d9b9b82d7a4f67 (patch)
treee0720779311443db440ab7eaf3a315051d4d7046 /tests/socket.test
parent7d53615f6beb67b4bdc2b0ad35b62c4667a1ab99 (diff)
downloadtcl-207329f22a7bf020db137dc4e6d9b9b82d7a4f67.zip
tcl-207329f22a7bf020db137dc4e6d9b9b82d7a4f67.tar.gz
tcl-207329f22a7bf020db137dc4e6d9b9b82d7a4f67.tar.bz2
Changed error report logic, that an async connect error is only reported by 'fconfigure -error' and not by a possible last command terminating the async connect. The terminating command always returns "socket is not connected" on connect error. In addition, some flags were renamed: TCP_ASYNC_SOCKET to TCP_NONBLOCKING and also the new state flags.
Diffstat (limited to 'tests/socket.test')
-rw-r--r--tests/socket.test12
1 files changed, 6 insertions, 6 deletions
diff --git a/tests/socket.test b/tests/socket.test
index d36d2b3..648ade5 100644
--- a/tests/socket.test
+++ b/tests/socket.test
@@ -1981,10 +1981,10 @@ test socket-14.7.2 {pending [socket -async] and blocking [gets], no listener} \
-body {
set sock [socket -async localhost [randport]]
catch {gets $sock} x
- list $x [fconfigure $sock -error]
+ list $x [fconfigure $sock -error] [fconfigure $sock -error]
} -cleanup {
close $sock
- } -match glob -result {{error reading "sock*": connection refused} {}}
+ } -match glob -result {{error reading "sock*": socket is not connected} {connection refused} {}}
test socket-14.8.0 {pending [socket -async] and nonblocking [gets], server is IPv4} \
-constraints {socket supported_inet supported_inet6} \
-setup {
@@ -2046,10 +2046,10 @@ test socket-14.8.2 {pending [socket -async] and nonblocking [gets], no listener}
if {[catch {gets $sock} x] || $x ne "" || ![fblocked $sock]} break
after 200
}
- list $x [fconfigure $sock -error]
+ list $x [fconfigure $sock -error] [fconfigure $sock -error]
} -cleanup {
close $sock
- } -match glob -result {{error reading "sock*": connection refused} {}}
+ } -match glob -result {{error reading "sock*": socket is not connected} {connection refused} {}}
test socket-14.9.0 {pending [socket -async] and blocking [puts], server is IPv4} \
-constraints {socket supported_inet supported_inet6} \
-setup {
@@ -2164,7 +2164,7 @@ test socket-14.11.0 {pending [socket -async] and blocking [puts], no listener, n
} -cleanup {
catch {close $sock}
unset x
- } -result {connection refused} -returnCodes 1
+ } -result {socket is not connected} -returnCodes 1
test socket-14.11.1 {pending [socket -async] and blocking [puts], no listener, flush} \
-constraints {socket supported_inet supported_inet6} \
-body {
@@ -2178,7 +2178,7 @@ test socket-14.11.1 {pending [socket -async] and blocking [puts], no listener, f
} -cleanup {
catch {close $sock}
unset x
- } -result {connection refused} -returnCodes 1
+ } -result {socket is not connected} -returnCodes 1
test socket-14.12 {[socket -async] background progress triggered by [fconfigure -error]} \
-constraints {socket supported_inet supported_inet6} \
-body {