library: five protocols speak the envelope
The folded header stops being a rule in a document and becomes the layout on the wire. Verbs number from sixteen, leaving describe, enumerate, subscribe and unsubscribe reserved and answered the same way by every provider — none of them writes a line to do it. What each protocol used to carry in a field of its own now travels in the header: a vfs node and a display layer are the packet's target, and a reply opens with a status the envelope stamps rather than one each protocol spelled for itself. Display gains the most. One forty-byte request had served eleven verbs, so attach_scanout smuggled stride through x, refresh through y and format through colour, and every coordinate crossed as a bitcast. Per-operation structs end all three: the fields have their own names and their own signs, and the tile payload grows to 224 bytes because the prefix shrank. Scanout loses a message maximum of 64 it had no business declaring — it answers calls, and the floor for a call is 256 — and virtio-gpu stops hard-coding that number at its harness. Two changes are semantic rather than notational. A directory now ends at an entry with no name, because the fixed part of a reply always travels and a zero-length reply no longer exists to mean anything. And input joins the service harness, the last loop in the tree that answered no ping and heard no terminate; its subscriber table, its pruning and its fan-out are the same code, and a shutdown now asks it to stop instead of killing it. A new conformance case reads the registry's own listing and asks every protocol it finds for its name, its version and its verb count, then offers a verb nobody defines and requires -ENOSYS — the envelope's promise, checked against providers rather than against itself. What it cannot reach in that boot it names on the serial line instead of passing quietly. Suite 110/110.
This commit is contained in:
@@ -889,6 +889,25 @@ CASES = [
|
||||
r"(?=.*protocol-denied: ok)"
|
||||
r"(?=.*DANOS-TEST-RESULT: PASS)",
|
||||
"fail": r"DANOS-TEST-RESULT: FAIL|protocol-denied: FAIL"},
|
||||
# The reserved verbs, asked of live providers (P4a). Every protocol built on
|
||||
# envelope.Define answers `describe` out of its specification and `-ENOSYS`
|
||||
# for a verb it does not define, without its provider implementing either —
|
||||
# so a fixture that walks /protocol's own listing and asks both of whatever
|
||||
# it finds is the proof that `Define` hands those verbs to everyone alike.
|
||||
# The scenario boots the registry, the input service and the compositor: two
|
||||
# protocols of different sizes and verb counts, both reached through the real
|
||||
# registry under the manifest's own grants. vfs, block and scanout are the
|
||||
# P4a protocols whose providers need hardware chains this case does not boot;
|
||||
# the fixture names them as unchecked rather than skipping them quietly, and
|
||||
# the existing fat-mount / usb-storage / virtio-gpu scenarios are their proof.
|
||||
{"name": "protocol-conformance",
|
||||
"expect": r"(?s)(?=.*protocol-conformance: input v\d+ describes itself)"
|
||||
r"(?=.*protocol-conformance: display v\d+ describes itself)"
|
||||
r"(?=.*-> -ENOSYS)"
|
||||
r"(?=.*protocol-conformance: 2 provider\(s\) answered the reserved verbs identically)"
|
||||
r"(?=.*protocol-conformance: ok)"
|
||||
r"(?=.*DANOS-TEST-RESULT: PASS)",
|
||||
"fail": r"DANOS-TEST-RESULT: FAIL|protocol-conformance: FAIL"},
|
||||
# Device manager: a ring-3 service enumerates /system/devices, matches the PCI host
|
||||
# bridge to pci-bus, and spawns it — end-to-end proof of discover -> match -> spawn
|
||||
# -> driver-up (the spawned pci-bus logs "<N> functions found").
|
||||
|
||||
Reference in New Issue
Block a user