Bound blocked dials in the test suite, and add an offline opt-out - #579
Bound blocked dials in the test suite, and add an offline opt-out#579Ticed wants to merge 1 commit into
Conversation
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.
cecbdf8 to
df8d227
Compare
|
Rebased onto current master (df34b02). Force-pushed cecbdf8 -> df8d227.
Re-verified on macOS after the rebase.
#578 fixed the ClusterFuzzLite link break, so |
Summary
tests/inferno/git_integration_test.shhas 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'stlsdialandrequest()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 inconnect()keeps the emulator alive afterinit()returns — 20s+ past test completion without it, 3.0s with it.tcp_test.b'sdialTimeoutalready bounded a blocked connect correctly; it got the same kill so it stops leaking the dialer.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.shpasses-o, the runner writes/env/INFERNODE_TESTS_OFFLINE, and the network tests skip before dialing.No module interface changed.
Test plan
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 connectconnect tcp!127.0.0.1!18443: no response within 10000ms, thenSKIP: clone failed, at ~10soctocat/Hello-Worldpassed all 10 steps;webclient_testpassed all 4 network tests against real TLS;tcp_testpassed Loopback/TcpDialIp/TcpWrite/env/INFERNODE_TESTS_OFFLINEverified writable and readable inside the emulatorChecklist
One thing found on the way and not fixed here:
git_integration_test.shstartsndb/cs, and a runningcskeeps 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.