liberps

Quality

How liberps is verified

Six kinds of evidence, each aimed at a different way an implementation of a ring protocol goes wrong: a row transcribed incorrectly, a scenario the spec describes, a race nobody thought of, malformed input, the real kernel, and a reader with fresh eyes.

Checks

CheckWhat it coversResultRun it
Unit testsEvery Table 10-2 row and both branches of each conditional row, against an independently re-derived row map; priority logic, timers, transmission, flush logic, validity check, FOP, manager, command layer, review regressions86 passmake test
Scenario testsWritten from the Recommendation by a separate author: Appendix III scenarios A–D, manual and forced switch rules, compatible-version 1, two-node ring, node failures, the guard-timer race of Appendix IV, one hour of stability, hold-off, cold start24 passmake test
Chaos property testRings of 2–16 nodes with random roles, timers, delay, jitter and loss, driven by random link failures (both directions or one), node failures and commands. Asserts no forwarding loop at any instant, convergence to Idle with only the RPL blocked, and no platform errors300,000 seedsERPS_CHAOS_SEEDS=300000
Compiler and sanitizer matrixgcc and clang, each plain and with AddressSanitizer and UndefinedBehaviorSanitizer, with -Wall -Wextra -Wpedantic -Wconversion -Werrorall greenmake check
Line coverageProtocol core and command layer95.4 % / 91.2 %make cov
FuzzingPDU decoder; the instance receive path with fuzz-chosen configuration, frames, time, commands and injected platform failures, checking invariants after every step; simulator event sequences with the loop check; the command layer~403 M runsmake fuzz
Linux end-to-endFour erpsd on four kernel bridges in a ring: convergence, no storm, failure, reversion, clean shutdown; also under AddressSanitizerpassmake e2e

CI runs the compiler matrix, a 20,000-seed chaos run, the simulator demo, the coverage gate and short fuzzing on every push.

What the reviews and tests found

Two independent conformance reviews read the code against the Recommendation, one with GPT-6 through Codex and one with Gemini through Antigravity. Both confirmed the Table 10-2 transcription. Their findings, and those of the chaos test and the kernel run, are listed with their outcome; each fix has a regression test.

SourceFindingOutcome
Review 1A port block that failed in hardware could still be advertised, letting a peer unblock and close a loopfixed new R-APS information waits for confirmed blocks
Review 1Destroying an instance from inside a callback; a non-revertive switch leaving WTR armed; lost flushes; deadline wrap near the clock limit; Stop Tx leaving an event burst; out-of-spec Tx rates; software forwarding tied to local validity; restart keeping receive statefixed
Review 1FOP-TO off by default, lenient TLV offset on receive, version 0 in compatible-version 1documented deliberate choices
Chaos testA Clear at the RPL owner while another node held a forced switch left the owner Pending with no timer, and the ring never revertedfixed Clear is not applicable at an owner in C or D
Kernel runBridge VLAN filtering was read from sysfs, which reflects the wrong network namespacefixed read over rtnetlink
Own reviewA packet socket could queue frames from other interfaces before its bind; a send on a downed port counted as a platform faultfixed
Review 2Long VLAN lists were truncated in running-config; erps_set_timers lacked the re-entrancy guardfixed
Review 2Proposed restricting row 71 to non-RPL nodeskept literal the change leaves two blocks and splits the ring

Reproduce a failure