diff options
author | apnadkarni <apnmbx-wits@yahoo.com> | 2023-06-19 13:39:31 (GMT) |
---|---|---|
committer | apnadkarni <apnmbx-wits@yahoo.com> | 2023-06-19 13:39:31 (GMT) |
commit | ded49faad51acb3519fe7780cc8299ac60840823 (patch) | |
tree | 1dbad3020128101004a2071352571a0fe865c77b /tests/chanio.test | |
parent | 2ebe7012dbad6f0a9e237750fd1db803a4b340d0 (diff) | |
parent | 73a582c685d14401f5765c5fdf3ba0437207320e (diff) | |
download | tcl-ded49faad51acb3519fe7780cc8299ac60840823.zip tcl-ded49faad51acb3519fe7780cc8299ac60840823.tar.gz tcl-ded49faad51acb3519fe7780cc8299ac60840823.tar.bz2 |
Merge 8.7 - fix tests - hardcoded port and wsl.
Diffstat (limited to 'tests/chanio.test')
-rw-r--r-- | tests/chanio.test | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/tests/chanio.test b/tests/chanio.test index e5e74cb..cdd5816 100644 --- a/tests/chanio.test +++ b/tests/chanio.test @@ -7279,22 +7279,23 @@ test chan-io-53.10 {Bug 1350564, multi-directional fcopy} -setup { } chan puts stderr SRV set l {} - set srv [socket -server new 9999] + set srv [socket -server new -myaddr 127.0.0.1 0] + set port [lindex [chan configure $srv -sockname] 2] chan puts stderr WAITING chan event stdin readable bye - chan puts OK + puts "OK $port" vwait forever } # wait for OK from server. - chan gets $pipe + lassign [chan gets $pipe] ok port # Now the two clients. proc done {sock} { if {[chan eof $sock]} { chan close $sock ; return } lappend ::forever [chan gets $sock] return } - set a [socket 127.0.0.1 9999] - set b [socket 127.0.0.1 9999] + set a [socket 127.0.0.1 $port] + set b [socket 127.0.0.1 $port] chan configure $a -translation binary -buffering none chan configure $b -translation binary -buffering none chan event $a readable [namespace code "done $a"] |