Files
Thomas Vincent 9582b71704 fix(runtime): [develop] retain reviewed probe and compiler stages after result normalization (#660)
The runtime/probe changes from #642 and GNU C17/build changes from #643
were squash-merged into #641's source branch, which made the
result-normalization review include later stages. This follow-up
preserves those approved changes while restoring #641's focused diff
against develop. No force-push or approved-code deletion is required.

Merge after #641 and before #644. #644 will target this branch. This
combines the already reviewed steps 5 and 6; it introduces no new
worker-stack or module-extraction changes.

The UDP follow-up also corrects a validated finding: EHOSTUNREACH on a
connected socket is ambiguous and can represent an unreachable host or
failed neighbour lookup. It now reports down; ECONNREFUSED/ECONNRESET
and actual peer datagrams retain their existing alive behavior. The
production-linked test rejects the original EHOSTUNREACH behavior.

Validation: Ubuntu 24.04/aarch64, clean GCC build and make check: 17
passed, one existing setuid prerequisite skip, zero failures. The full
tracked source tree is byte-identical to the independently validated
#641 functional-fix snapshot. The UDP and poll-host regressions fail
against the original code and pass after the fixes. The isolated step-4
tree independently passes 15 tests with one existing skip. No live
endpoints, host installation, privilege changes, or test suppression.

Repository squash merges still require restacking/retargeting the next
child after each merge; clean ordinary merge simulations are
insufficient by themselves.

---------

Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>
2026-10-19 14:17:35 -04:00
..

Spine test harness

make check runs the cmocka unit tests. The Docker-backed integration fixture uses a real Net-SNMP agent and MariaDB or MySQL to exercise the complete poll and persistence path.

Run the standard end-to-end test with:

SPINE_TEST_DATABASE=mariadb tests/snmpv3/scripts/run-integration.sh

Run the concurrency contract with:

SPINE_TEST_HOSTS=24 \
SPINE_TEST_THREAD_COUNTS="1 4 12" \
SPINE_TEST_REPEATS=1 \
tests/integration/test_concurrency.sh

Exercise timeout and recovery behavior with real UDP packet loss:

tests/integration/test_network_faults.sh

The concurrency test creates an isolated Compose project, clones independent SNMPv3 host records, sweeps worker counts, and verifies exact output and host accounting after every run. It is intentionally transport-neutral so it can also test a future libuv engine and reactor-count matrix without changing its assertions. Fixture services communicate only on their project-local Compose network, so independent test projects can run without competing for host ports. The fault test uses tc netem inside the test-only SNMP agent container to drop every response, verifies bounded completion without stale output, removes the fault, and verifies the next poll recovers.

Useful controls:

  • SPINE_TEST_TIMEOUT_SECONDS: per-Spine-run timeout (default 120).
  • SPINE_TEST_ARTIFACT_DIR: destination for logs and TAP results.
  • SPINE_TEST_KEEP_ENV_ON_FAILURE=1: preserve containers after a failure.
  • SPINE_TEST_PROJECT: explicit Compose project name for reproducibility.
  • SPINE_TEST_EXTRA_ARGS: additional whitespace-separated Spine arguments. This provides the hook for future --snmp-engine and reactor-count sweeps; arguments are split but never evaluated as shell code.

Keep CI workloads bounded. Larger host counts and repeat counts belong in a scheduled soak workflow rather than the pull-request critical path.