Expand description
A tiny, dependency-free HTTP server that serves MS-SMB2 test results.
It reads a CSV (the source of truth for pass/fail state), exposes a REST API over it, and serves a static single-page dashboard that renders progress. It listens on the SMB port plus one so it sits next to the server under test.
Modulesยง
- csv ๐
- CSV storage for test results. The schema is a header line followed by rows:
suite,name,category,status,duration_ms,timestamp,commit,note.suiteis one ofprotocol/unit/system;statusispass/fail/skip/unknown;commitis the changeset the test last passed at (empty when not passing);noteexplains a skip/fail reason (empty otherwise). - http ๐
- A minimal blocking HTTP/1.1 request handler covering the routes the dashboard needs: the static page and two read-only JSON endpoints.
- json ๐
- Hand-rolled JSON serialization for the REST responses (no dependencies).
Structsยง
- Config ๐
- Runtime configuration resolved from the command line.
Constantsยง
- DEFAULT_
SMB_ ๐PORT - Default SMB port the dashboard sits next to (it listens on this plus one).
- EXIT_
USAGE ๐ - Exit code for a command-line usage error.
Functionsยง
- fail ๐
- main ๐
- next_
u16 ๐ - next_
value ๐ - parse_
args ๐ - Parse
--smb-port,--portand--csv. The dashboard defaults to the SMB port (4450) plus one; an explicit--portoverrides that. - print_
help_ ๐and_ exit - serve ๐
- Bind the listener and hand each connection to a worker thread. The CSV path is shared read-only; every request re-reads the file so external test runs are reflected immediately.