Skip to content

sim: The upgrade/revert tests should use images having different sizes #2110

@taltenbach

Description

@taltenbach

Unless swap-move or overwrite-only upgrade strategies are used, the automatic tests executed in the simulator are configured to use two images of the same size for testing the upgrade and revert processes.

Indeed, the size of the images seems to be defined by this routine:

mcuboot/sim/src/image.rs

Lines 2295 to 2303 in f74b77c

fn maximal(size: usize) -> ImageSize {
if Caps::OverwriteUpgrade.present() ||
Caps::SwapUsingMove.present()
{
ImageSize::Given(size)
} else {
ImageSize::Largest
}
}

I agree it is a good thing to test the upgrade and revert processes with the largest possible images but I also think it important to that with two images having different sizes, since equally-sized images is very specific and uncommon scenario and testing only that scenario doesn't enable to detect issues such the one described by #2109, occurring only when the two images have not exactly the same size.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions