New failures in socket.test
Closed / Fixed54d730a47d76c0a2c4148224b236574bce20997fCreated 72 days agoUpdated 69 days ago
Descriptionplain2026-09-22 14:47:23
==== socket_inet6-2.3 tcp connection with client interface specified FAILED
==== Contents of test case:
# $x == "ready" at this point
set sock [socket -myaddr $localhost $localhost $listen]
puts $sock hello
flush $sock
lappend x [gets $f]
close $sock
return $x
---- Result was:
ready {hello ::1}
---- Result should have been (exact matching):
ready {hello ::}
==== socket_inet6-2.3 FAILED
==== socket_inet6-7.1 testing socket specific options FAILED
==== Contents of test case:
set s [socket $localhost $listen]
set p [fconfigure $s -peername]
close $s
lappend l [string compare [lindex $p 0] $localhost]
lappend l [string compare [lindex $p 2] $listen]
lappend l [llength $p]
---- Result was:
1 0 3
---- Result should have been (exact matching):
0 0 3
==== socket_inet6-7.1 FAILED
==== socket_inet6-7.2 testing socket specific options FAILED
==== Contents of test case:
set s [socket $localhost $listen]
set p [fconfigure $s -sockname]
close $s
list [llength $p] [string match $localhost [lindex $p 0]] [expr {[lindex $p 2] == $listen}]
---- Result was:
3 0 0
---- Result should have been (exact matching):
3 1 0
==== socket_inet6-7.2 FAILED
==== socket_inet6-7.5 testing socket specific options FAILED
==== Contents of test case:
set s [socket -server accept 0]
proc accept {s a p} {
global x
set x [fconfigure $s -sockname]
close $s
}
set listen [lindex [fconfigure $s -sockname] 2]
set s1 [socket $localhost $listen]
vwait x
lappend l [lindex $x 0] [expr {[lindex $x 2] == $listen}] [llength $x]
---- Result was:
::1 1 3
---- Result should have been (exact matching):
:: 1 3
==== socket_inet6-7.5 FAILED
Referenced by2
abc140b2e7[54d730a47d] Repair failing tests in socket.test check-in2026-09-24 13:18:138d2cd4a9a1Fix [54d730a47d]: don't produce a 0.0.0.0 / :: address check-in2026-09-23 21:28:12
dgp Ticket [54d730a47d]: 3 changes
[History diff]2026-09-22 14:48:20
sebreswiki2026-09-22 17:16:29
Hmm... Looks like it could be affected by [122d37d474e7768f]...
What do [tcltests::localIPv4Address] and [tcltests::localIPv6Address] return on that particular system?
dgpplain2026-09-23 20:09:01
$ make shell
...
% source ../tests/tcltests.tcl
% tcltests::localIPv6Address
::
% set s [socket -server {} 0]
sock55d7108e67e0
% chan configure $s -sockname
0.0.0.0 0.0.0.0 40205 :: :: 40205
The new utility command thinks the default IPv6 address is ::
The reason why is seen above.
This replaced a hard-coded value of ::1
That breaks things.
gahrplain2026-09-23 21:12:51
It works fine if we use [socket -server {} -myaddr localhost 0]. Since we prefer this version, it must be the case that your system doesn't like it.
What's the result of
set s [socket -server {} -myaddr localhost 0]
chan configure $s -sockname
?
dgpplain2026-09-24 12:28:17
% set s [socket -server {} -myaddr localhost 0]
sock555a5612a2a0
% chan configure $s -sockname
127.0.0.1 localhost 43881
This gets the expected value for the IPv4 but contributes
nothing toward finding an answer for IPv6
dgpplain2026-09-24 12:30:54
BTW, there is a stray "1" on line 174 of socket.test that makes no sense to me. Please confirm it should be removed.
gahrplain2026-09-24 12:44:26
> BTW, there is a stray "1" on line 174 of socket.test that Yep, removed in the [bug-54d730a47d] branch.
dgpplain2026-09-24 13:10:32
The edits on the bug-54d730a47d branch make all tests pass for me again. I will merge them to trunk. FWIW, the localhost6 check does nothing here (error), and this system ends up using the phase4 fallback for IPv6
dgp Closed ticket [54d730a47d].
[History diff]2026-09-24 13:18:57
gahrplain2026-09-24 13:20:33
Out of curiosity, what system are you running on?
dkfmarkdown2026-09-24 13:41:10
That branch has socket.test pass for me on Windows 11 with local networking being IPv6.
dkfmarkdown2026-09-24 13:42:04
That branch has socket.test pass for me on Windows 11 with local networking being IPv6.
gahrplain2026-09-25 07:11:05
Test to see if the Cloudflare WAF blocks me
Log in (anonymous is fine) to add a comment.