Add simple status write test without interruption
This test marks the status write regions as a bad region,
causing errors, but it is allowed to complete the swap. On
restart the firmware in slot0 should be validated and work.
Signed-off-by: Fabio Utzig <utzig@apache.org>
diff --git a/sim/src/lib.rs b/sim/src/lib.rs
index e22984e..cddb48c 100644
--- a/sim/src/lib.rs
+++ b/sim/src/lib.rs
@@ -173,6 +173,7 @@
assert_eq!(slot1_base, slot0_base + slot0_len);
assert_eq!(scratch_base, slot1_base + slot1_len);
+ // NOTE: not accounting "swap_size" because it is not used by sim...
let offset_from_end = c::boot_magic_sz() + c::boot_max_align() * 2;
// Construct a primary image.
@@ -295,6 +296,8 @@
failed |= images.run_perm_with_random_fails(5);
failed |= images.run_norevert();
+ failed |= images.run_with_status_fails_complete();
+
//show_flash(&flash);
if failed {