Repository navigation
feat(events-export): EXD-T03 — the self-test gate, live (V406) - #405
Merged
Merged
Conversation
The interface-naming flavor's daemon runs -eventsEnable -eventsDest file:/var/log/xtcp2-events.bin beside -localityEvents (the both-on composition), and the new EVENTS_EXPORT check drives a link add/up/ addr/del sequence (evtcheck0, 198.51.100.77/32 - unique, so the file's other events cannot satisfy the greps) in the daemon's own namespace, reads the export back with events-probe (tools/ events-probe, riding xtcp2AllPackage like rtnlmon-probe: the ProtobufList read-back, printing rtnlmon-probe's line grammar plus the per-row netns), and asserts the four steps in order, the root listener's netns=default, and the interval flush counter. The live run (nix build .#test-microvm-lifecycle-x86_64-interface- naming, booted and driven here): EVENTS_EXPORT_PASS (add=35 addr=40 del=50; rows=50; interval flushes=25) and OVERALL_PASS. Two root causes the gate caught, both now unit-pinned: 1. the interval chain was armed only inside flushLocked - an exporter whose namespaces produce no startup events (a quiet boot) never arms one, and the 1s bound is dead from the start. The chain now arms at construction (newEventsExport), and TestEventsExportIntervalFromConstruction pins the fix. 2. the empty interval flush did not count (the return came before the counter), so the flush counter proved nothing on a quiet file; the counter now fires on every trigger, an empty envelope included - the empty cadence is the proof the timer lives. The gate's own lessons, recorded in the ledger: the metrics' labels print sorted (function, type, variable - a variable=...type=... grep order never matches), the self-test's echo lines never reach the journal (the diagnostics ride the sentinel line itself), and the check does not demand the whole file be netns=default - the rows from the flavor's other namespace are the per-namespace listener's, the both-on second in-namespace thread's events (the run shows 8 of 52 on the non-root namespace). Gates: both full suites, vet both modes, gofmt, lint-baseline, nix-fmt, test-goip-docs, netlink-audit, test-goip-monitorfile, the VM lifecycle gate itself. Generated with [pi](https://github.com/badlogic/pi-mono)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Tier EXD's last task: the self-test flavor gate (per
docs/netlink/events-export.md, EXD-T03). The gate ran live here — the VM booted, the check drove events, the export was read back, andOVERALL_PASScame out.The gate
The interface-naming flavor's daemon runs
-eventsEnable -eventsDest file:/var/log/xtcp2-events.binbeside-localityEvents(the both-on composition). The new EVENTS_EXPORT check drives a link add/up/addr/del sequence (evtcheck0,198.51.100.77/32— unique, so the file's other events cannot satisfy the greps) in the daemon's own namespace, reads the export back with events-probe (tools/events-probe, ridingxtcp2AllPackagelikertnlmon-probe: the ProtobufList read-back viarecordfmt.NextDelimited+UnmarshalVT, printing rtnlmon-probe's line grammar plus the per-row netns), and asserts the four steps in order, the root listener'snetns=default, and the interval flush counter.The live run (
nix build .#test-microvm-lifecycle-x86_64-interface-naming, booted and driven here):Two root causes the gate caught, both now unit-pinned
flushLocked— an exporter whose namespaces produce no startup events (a quiet boot) never arms a timer, and the 1s bound is dead from the start. The chain now arms at construction (newEventsExport);TestEventsExportIntervalFromConstructionpins the fix.The gate's own lessons (in the ledger)
function, type, variable— avariable=…type=…grep order never matches; the locality check's greps never placetype=aftervariable=for this reason).XTCP2_SELF_TEST_*sentinel line itself.netns=default: the rows from the flavor's other namespace are the per-namespace listener's — the both-on second in-namespace thread's events (the run shows 8 of 52 on the non-root namespace).Gates
Both full suites,
go vetboth modes, gofmt,lint-baseline,nix-fmt,test-goip-docs,netlink-audit,test-goip-monitorfile, and the VM lifecycle gate itself. Ledger: V406 inevents-export-status.md; Tier EXD done.🤖 Generated with pi