Skip to content

Bound blocked dials in the test suite, and add an offline opt-out - #579

Open
Ticed wants to merge 1 commit into
infernode-os:masterfrom
Ticed:fix/bound-blocked-test-dials
Open

Bound blocked dials in the test suite, and add an offline opt-out#579
Ticed wants to merge 1 commit into
infernode-os:masterfrom
Ticed:fix/bound-blocked-test-dials

Conversation

@Ticed

@Ticed Ticed commented Aug 31, 2026

Copy link
Copy Markdown

Summary

  • tests/inferno/git_integration_test.sh has an environmental skip-guard (INFR-312) that only fires when the dial fails. A connect held open — a host firewall in ask mode, a blackholed route — never fails, so the guard never runs and the emulator sits with no output holding its ports.
  • webclient's tlsdial and request() now run dial plus TLS handshake in a child proc raced against a 10s timer, and kill the child on timeout. The kill is load-bearing: a proc blocked in connect() keeps the emulator alive after init() returns — 20s+ past test completion without it, 3.0s with it.
  • tcp_test.b's dialTimeout already bounded a blocked connect correctly; it got the same kill so it stops leaking the dialer.
  • Adds INFERNODE_TESTS_OFFLINE=1, so a runner declares its environment instead of the suite inferring it from a dial that may never return. run-tests.sh passes -o, the runner writes /env/INFERNODE_TESTS_OFFLINE, and the network tests skip before dialing.

No module interface changed.

Test plan

  • Reproduced first, with an accept-and-never-respond listener: discovering refs... then nothing, killed at 45s with no PASS/FAIL/SKIP. A refused dial was run as contrast — the guard fires instantly, isolating the defect to the blocked connect
  • After: connect tcp!127.0.0.1!18443: no response within 10000ms, then SKIP: clone failed, at ~10s
  • Network present, which is the check that matters — a timeout must not turn a working test into a permanent skip: real clone of octocat/Hello-World passed all 10 steps; webclient_test passed all 4 network tests against real TLS; tcp_test passed Loopback/TcpDialIp/TcpWrite
  • /env/INFERNODE_TESTS_OFFLINE verified writable and readable inside the emulator

Checklist

  • Commits signed
  • No behaviour change when the network is reachable

One thing found on the way and not fixed here: git_integration_test.sh starts ndb/cs, and a running cs keeps the emulator alive after the last test reports — a second, independent reason a suite run hangs at exit. Happy to send that separately; it needs a decision about who reaps it.

@Ticed
Ticed requested a review from pdfinn as a code owner August 31, 2026 13:03
A host firewall in ask mode never fails a connect - it blocks it, so
the environmental skip-guards in the network tests never ran and the
emulator sat with no output holding its ports. Bound dial and TLS
handshake in webclient (git clone goes through tlsdial) at 10s, kill
the blocked dialer on timeout so it cannot hold the emulator at exit,
and give tcp_test's dialTimeout the same treatment.

Add INFERNODE_TESTS_OFFLINE=1 (run-tests.sh passes -o to the runner,
which writes /env/INFERNODE_TESTS_OFFLINE) so a runner declares the
environment and network tests skip deterministically instead of
inferring it from a dial that may never return.
@Ticed
Ticed force-pushed the fix/bound-blocked-test-dials branch from cecbdf8 to df8d227 Compare September 2, 2026 03:16
@Ticed

Ticed commented Sep 2, 2026

Copy link
Copy Markdown
Author

Rebased onto current master (df34b02). Force-pushed cecbdf8 -> df8d227.

git range-diff reports every commit unchanged — same content, same messages,
only the base moved. The five commits that landed underneath are #583, #582,
#566, #578 and #580; none of them touches this branch's files.

Re-verified on macOS after the rebase.

runner.dis -o sets INFERNODE_TESTS_OFFLINE and the networked cases report
SKIP against it, while the loopback case still passes. A dial to TEST-NET
192.0.2.1 now returns bounded instead of hanging: 3004 ms for the tcp case and
10004 ms for the TLS one, "no response within 10000ms". That is the case the
change exists for — a dial that is silently dropped rather than refused used to
hang the suite indefinitely.

#578 fixed the ClusterFuzzLite link break, so Fuzz should now be green here
rather than red for a reason that was never this branch's.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant