summaryrefslogtreecommitdiffstats
path: root/tests/chanio.test
diff options
context:
space:
mode:
authorapnadkarni <apnmbx-wits@yahoo.com>2023-06-19 13:21:46 (GMT)
committerapnadkarni <apnmbx-wits@yahoo.com>2023-06-19 13:21:46 (GMT)
commit73a582c685d14401f5765c5fdf3ba0437207320e (patch)
tree43eb158cca5e37658bf052292515de09491f2b77 /tests/chanio.test
parentec8dfd57db4d9f4cfdef1f38109a55addf6c030a (diff)
parentc2f255fe8425a37da1e023267829f7d497c9a219 (diff)
downloadtcl-73a582c685d14401f5765c5fdf3ba0437207320e.zip
tcl-73a582c685d14401f5765c5fdf3ba0437207320e.tar.gz
tcl-73a582c685d14401f5765c5fdf3ba0437207320e.tar.bz2
Merge 8.6 - fix tests - hardcoded port and wsl.
Diffstat (limited to 'tests/chanio.test')
-rw-r--r--tests/chanio.test11
1 files changed, 6 insertions, 5 deletions
diff --git a/tests/chanio.test b/tests/chanio.test
index 179d7a7..b80c926 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"]