Conversation
The QEMU runner filled each FMC backing image with one byte, so a test could hand the device erased flash and nothing else. The integration test needs the device to already hold a firmware image the update agent can offer. cs0_contents and cs1_contents name a file to copy in at offset 0; the remainder stays 0xFF. Without them the fill byte behaves as before, so every existing test is unchanged. A contents file longer than flash_size is an error rather than a truncation. A half-written image still parses far enough to fail verification, which would make a verify-failure scenario pass for the wrong reason. Assisted-by: Claude
A QEMU test that offers a firmware image needs that image on flash before the guest boots. The harness can now seed a chip select from a file; this makes the file. The layout arrives as arguments but is built with the same Region, Slot and ImageLayout constructors the board tables use, so a layout this tool accepts is one the orchestrator would accept: unique slot ids, no overlap, no zero-length region, nothing past the end of the offset space. Re-deriving those rules here would let a test image drift from what the firmware believes about the same flash. Everything no image covers stays 0xFF, and a payload too large for its slot is an error rather than a truncation. The flash_image rule wraps the tool so a BUILD file can hand the result straight to cs0_contents or cs1_contents. Assisted-by: Claude
A QEMU test has no wire and no second chip, but the PLDM firmware device still has to reach an update agent. This is the transport for that: each server queues what its router fragments, and the caller feeds that queue to the other server's inbound. One server's outbox is the other's wire. Two servers, not one looping back to itself. A message addressed to a server's own EID has no route out and back, which the router reports as BadArgument before the sender is ever consulted. The queue belongs to the caller rather than to the sender, because the router takes the sender by value and offers no way back to it. Draining in the caller's loop also keeps the send path non-blocking. The fragment buffer holds the MTU plus the four-byte MCTP header. A buffer of exactly the MTU makes the router refuse the send rather than truncate it. The arrangement comes from services/mctp/echo/tests/echo_host.rs, which does the same thing with test-local helpers. This is the library version, so an app can use it. Assisted-by: Claude
This branch has not been deployed
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.
Review the last commit only. The two before it are #532 and #533; the
fork cannot host a real stack.
A QEMU test has no wire and no second chip, but the PLDM firmware device
still has to reach an update agent. This is the transport for that: each
server queues what its router fragments, and the caller feeds that queue
to the other server's inbound. One server's outbox is the other's wire.
Two servers, not one looping back to itself. A message addressed to a
server's own EID has no route out and back, which the router reports as
BadArgument before the sender is ever consulted.
The queue belongs to the caller rather than to the sender, because the
router takes the sender by value and offers no way back to it.
The arrangement comes from services/mctp/echo/tests/echo_host.rs, which
does the same thing with test-local helpers. This is the library version,
so an app can use it. If you would rather not have two, the echo test
could use this crate instead and its helpers go away.
Assisted-by: Claude