Overview
| Comment: | Discover localhost IPv4 and IPv6 addresses instad of hardcoding them This commit fixes a long-standing pain point of running tests in an environment where localhost isn't bound to 127.0.0.1 or ::1, e.g., in a FreeBSD jail. It does that by introducing two variables, ::tcltest_ipv4 and ::tcltest_ipv6, which can be used by tests to refer to the local IPv4 and IPv6 addresses, respectively. The variables are populated in fallback order from a server socket, from environment variables, and from the hard-coded defaults. |
|---|---|
| Timelines: | family | ancestors | descendants | both | gahr-no-hardcoded-ip-addresses |
| Files: | files | file ages | folders |
| SHA3-256: |
4337c99176a2744929aaf3ce3cb52f82 |
| User & Date: | gahr on 2026-09-15 20:01:47.569 |
| Original Comment: | Discover localhost IPv4 and IPv6 addresses instad of hardcoding them This commit fixes a long-standing pain point of running tests in an environment where localhost isn't bound to 127.0.0.1 or ::1, e.g., in a FreeBSD jail. It does that by introducing two variables, ::tcltest_ipv4 and ::tcltest_ipv6, which can be used by tests to refer to the local IPv4 and IPvt6 addresses, respectively. The variables are populated in fallback order from a server socket, from environment variables, and from the hard-coded defaults. |
| Other Links: | branch diff | manifest | tags |
Context
|
2026-09-15
| ||
| 21:50 | Provide the functionality in tcltest itself check-in: 5cf8ba82d6 user: gahr tags: gahr-no-hardcoded-ip-addresses | |
| 20:01 | Discover localhost IPv4 and IPv6 addresses instad of hardcoding them This commit fixes a long-sta... check-in: 4337c99176 user: gahr tags: gahr-no-hardcoded-ip-addresses | |
| 19:58 | Merge trunk check-in: aa9600a3c5 user: gahr tags: gahr-no-hardcoded-ip-addresses | |
Changes
Modified tests/all.tcl
from [425b2a8d85]
to [10471de18e].
[diff]
Modified tests/chan.test
from [0180eb5ed0]
to [499a029333].
[diff]
Modified tests/chanio.test
from [20a6c9bbe5]
to [94d1df287e].
[diff]
Modified tests/event.test
from [1b8164ad4f]
to [3ae729371c].
[diff]
Modified tests/httpProxy.test
from [b186e0e5dd]
to [19359ea1e1].
[diff]
Modified tests/io.test
from [4c87ee13cc]
to [64fe639f54].
[diff]
Modified tests/ioCmd.test
from [ed40ce44d7]
to [4cd806d226].
[diff]
Modified tests/iogt.test
from [faf03c6861]
to [03fa7f56fd].
[diff]
Modified tests/socket.test
from [c220131279]
to [6029f467b9].
[diff]
Modified tests/unixInit.test
from [6c5952f48c]
to [93d2408228].
[diff]