Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
taltenbach opened this issue Nov 10, 2024 · 0 comments
Open

Comments

@taltenbach
Copy link
Contributor

taltenbach commented Nov 10, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant