update_engine: Fix full payload generation when using chunk_size.
We already check that the partition size and the chunk_size are multiples
of the block_size, but we assume that the partition size is a multiple of the
chunk_size and that was mostly always the case. This patch fixes that by
setting the right operation size for the last rootfs and kernel operation.
BUG=chromium:485397
TEST=Added unit test to check this case.
Change-Id: Ia025d299c07bbe0732cf8554b75f4d40b6e063f9
Reviewed-on: https://chromium-review.googlesource.com/282758
Reviewed-by: Gabe Black <gabeblack@chromium.org>
Reviewed-by: Don Garrett <dgarrett@chromium.org>
Commit-Queue: Alex Deymo <deymo@chromium.org>
Trybot-Ready: Alex Deymo <deymo@chromium.org>
Tested-by: Alex Deymo <deymo@chromium.org>
2 files changed