library: the last three protocols speak the envelope
These were the awkward ones. Each began with an operation packed into a single byte — two of them with a version wedged in beside it — so there was no wrapping them: the layouts had to be rebuilt. The device manager's own enumerate and subscribe become the reserved verbs that mean the same thing everywhere, its replies lose three status structs the envelope already carries, and a device id becomes the packet's target. Power drops the version it repeated on every request, because describe is the handshake, and stops claiming a 64-byte ceiling it never needed for calls. USB moves a control transfer's data to the packet tail in both directions, which makes the status length the transferred length and retires a field that had been saying the same thing twice. The danger in this one was not the protocols but their readers. Init recognised a power button by two bytes at the head of a message, the ACPI service dispatched on the first byte, the xHCI driver read its operation with a raw integer load, and the HID drivers reinterpreted a report wholesale — none of which would have failed to compile once the layouts moved. They would simply have stopped: no shutdown on the power button, no reports from the keyboard. Every one of them now reads through the generated types, and the shutdown gate that answers only a subscriber is the same code it was. Two sizes were decided by measuring rather than assuming. The child-added message is both a request and the event broadcast to subscribers, and alignment rounds it to 48 bytes, which puts its packet exactly on the 64-byte push floor — a test pins that, because a field added carelessly would now overflow it. The interrupt report gives up eight bytes of inline room to make space for the header; the two drivers that produce reports send eight and four. Suite 110/110.
This commit is contained in:
+8
-4
@@ -896,10 +896,14 @@ CASES = [
|
||||
# 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.
|
||||
# registry under the manifest's own grants. The other six the fixture knows —
|
||||
# vfs, block, scanout, device-manager, power and usb-transfer — need provider
|
||||
# chains this case does not boot (the last three all arrive with the device
|
||||
# manager, i.e. with the whole driver tree, whose timing would make this
|
||||
# fixture's one namespace snapshot a boot race). It names them as unchecked
|
||||
# rather than skipping them quietly, and the fat-mount / usb-storage /
|
||||
# virtio-gpu / device-list / driver-restart / pci-scan / usb-* /
|
||||
# orderly-shutdown 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)"
|
||||
|
||||
Reference in New Issue
Block a user