let's wrap this up

This commit is contained in:
Robin Mueller
2026-09-16 13:22:47 +02:00
parent 1256c6b07f
commit c6fe161180
4 changed files with 30 additions and 56 deletions
+7 -4
View File
@@ -137,9 +137,7 @@ fn handle_mgm_command(
) -> anyhow::Result<()> {
if let Some(mode) = args.spi_fault {
if target_id != types::ComponentId::AcsMgm0 {
bail!(
"SPI fault injection is only supported for MGM0 right now (minisim limitation)"
);
bail!("SPI fault injection is only supported for MGM0 right now (minisim limitation)");
}
inject_mgm_failure(mode.into())?;
}
@@ -419,7 +417,12 @@ fn inject_mgm_failure(mode: SpiFaultMode) -> anyhow::Result<()> {
}
}
}
Err(e) if matches!(e.kind(), std::io::ErrorKind::WouldBlock | std::io::ErrorKind::TimedOut) => {
Err(e)
if matches!(
e.kind(),
std::io::ErrorKind::WouldBlock | std::io::ErrorKind::TimedOut
) =>
{
bail!("minisim not reachable at {sim_addr} (ping timed out) - is it running?");
}
Err(e) => return Err(e.into()),