Auto: ablegacy-9 — per-device timeout / retry overrides

Closes #252
This commit is contained in:
Joseph Doherty
2026-04-26 03:32:45 -04:00
parent 4ff1537d8a
commit c292dcc1db
9 changed files with 585 additions and 51 deletions

View File

@@ -139,6 +139,38 @@ bit writes to real hardware or RSEmulate 500 until upstream resolves.
See [`docs/drivers/AbLegacy-Test-Fixture.md`](../../../docs/drivers/AbLegacy-Test-Fixture.md)
for the full coverage map.
## Per-device timeout fixture (PR 9 / #252) — TODO
`AbLegacyPerDeviceTimeoutTests.Per_device_Timeout_below_simulated_delay_surfaces_BadCommunicationError`
needs a slow-link sidecar before it can run for real. The simulator answers
in <100 ms locally, so a 500 ms per-device timeout never trips against
the unmodified container.
Two options, neither wired up at PR 9 time:
1. **`tc qdisc` netem inside the container** — add to `docker-compose.yml`:
```yaml
# services:
# ablegacy-slc500-slow:
# extends: ablegacy-slc500
# cap_add: [NET_ADMIN]
# command: >
# sh -c "tc qdisc add dev eth0 root netem delay 800ms &&
# ab_server --plc=SLC500 --port=44818 --path=1,0 --tag=N7[200]:INT16"
```
`--cap-add=NET_ADMIN` is required because `tc qdisc` mutates the
container's egress queue. Combine with `AB_LEGACY_COMPOSE_PROFILE=slc500-slow`
to point the suite at the slow profile.
2. **`iptables --delay` shim** — sidecar container that NATs port 44818 and
adds a fixed delay on the SYN/ACK + payload path. More portable than
netem (no `NET_ADMIN` on the simulator itself) but adds a hop.
When either lands, drop the `Skip = …` on the integration test and assert
the precedence rule end-to-end.
## References
- [libplctag on GitHub](https://github.com/libplctag/libplctag) — `ab_server`