From f0c184a069af5733133ae8b053918986b4cff221 Mon Sep 17 00:00:00 2001 From: max Date: Fri, 4 Apr 2014 15:56:48 +0000 Subject: Move tests 8.2 and 8.3 out of the IPv4/IPv6 loop to 14.13 and 14.14. --- tests/socket.test | 63 ++++++++++++++++++++++++++++--------------------------- 1 file changed, 32 insertions(+), 31 deletions(-) diff --git a/tests/socket.test b/tests/socket.test index 927e544..d36d2b3 100644 --- a/tests/socket.test +++ b/tests/socket.test @@ -998,37 +998,6 @@ test socket_$af-8.1 {testing -async flag on sockets} -constraints [list socket s close $s1 } -result bye -test socket_$af-8.2 {testing writable event when quick failure} -constraints [list socket win supported_$af] -body { - # Test for bug 336441ed59 where a quick background fail was ignored - - # Test only for windows as socket -async 255.255.255.255 fails - # directly on unix - - # The following connect should fail very quickly - set a1 [after 2000 {set x timeout}] - set s [socket -async $localhost 43434] - fileevent $s writable {set x writable} - vwait x - set x -} -cleanup { - catch {close $s} - after cancel $a1 -} -result writable - -test socket_$af-8.3 {testing fileevent readable on failed async socket connect} -constraints [list socket supported_$af] -body { - # Test for bug 581937ab1e - - set a1 [after 5000 {set x timeout}] - # This connect should fail - set s [socket -async localhost [randport]] - fileevent $s readable {set x readable} - vwait x - set x -} -cleanup { - catch {close $s} - after cancel $a1 -} -result readable - test socket_$af-9.1 {testing spurious events} -constraints [list socket supported_$af] -setup { set len 0 set spurious 0 @@ -2225,6 +2194,38 @@ test socket-14.12 {[socket -async] background progress triggered by [fconfigure unset x s } -result {connection refused} +test socket-14.13 {testing writable event when quick failure} -constraints {socket win supported_inet} -body { + # Test for bug 336441ed59 where a quick background fail was ignored + + # Test only for windows as socket -async 255.255.255.255 fails + # directly on unix + + # The following connect should fail very quickly + set a1 [after 2000 {set x timeout}] + set s [socket -async 255.255.255.255 43434] + fileevent $s writable {set x writable} + vwait x + set x +} -cleanup { + catch {close $s} + after cancel $a1 +} -result writable + +test socket-14.14 {testing fileevent readable on failed async socket connect} -constraints [list socket] -body { + # Test for bug 581937ab1e + + set a1 [after 5000 {set x timeout}] + # This connect should fail + set s [socket -async localhost [randport]] + fileevent $s readable {set x readable} + vwait x + set x +} -cleanup { + catch {close $s} + after cancel $a1 +} -result readable + + ::tcltest::cleanupTests flush stdout return -- cgit v0.12