summaryrefslogtreecommitdiff
path: root/tools/image_test.zig
diff options
context:
space:
mode:
Diffstat (limited to 'tools/image_test.zig')
-rw-r--r--tools/image_test.zig3
1 files changed, 3 insertions, 0 deletions
diff --git a/tools/image_test.zig b/tools/image_test.zig
index 9f2cbc0..c13adf7 100644
--- a/tools/image_test.zig
+++ b/tools/image_test.zig
@@ -120,6 +120,8 @@ test "an image with one mapped segment is rejected before it can brick a board"
var layout = try image.fromElf(gpa, elf, .{});
defer layout.deinit(gpa);
+ // Not a guess: shipping a one-segment image aborted the boot with
+ // "Assert failed in unpack_load_app, bootloader_utility.c:842 (rom_index == 2)".
try testing.expectError(error.NotTwoMappedSegments, layout.validate(.{}));
}
@@ -275,6 +277,7 @@ fn checkBytes(bytes: []const u8, flash_offset: u32) !void {
}
off += 8 + len;
}
+ // Exactly two: the SOC_MMU_DI_VADDR_SHARED branch asserts rom_index == 2.
try testing.expectEqual(@as(usize, 2), mapped); // bootloader_utility.c:842
// Two mapped segments sharing a vaddr page must share the flash page: one MMU entry each.