Allow the image to be up to 10MB larger than specified.

We ran into a case in the reven-vmtest postsubmit builder where
image_to_vm.sh was failing because the stateful partition on our test
images was 8198MB, while the disk layout specifies 8192MB.

After some investigation we narrowed the issue down to the `fs_align`
attribute in disk_layout_v2.json: without that attribute the stateful
partition comes out as specified.

This change makes image_to_vm.sh more permissive when resizing the
stateful partition: the partition on the image can now be up to 10MB
larger than is specified in the disk layout.

BUG=b:199909888
TEST=setup_board --board reven-vmtest
     ./build_packages --board reven-vmtest
     ./build_image --board reven-vmtest test
     ./image_to_vm.sh --board reven-vmtest --test_image

Change-Id: I6a378abc5125c720a8cea1900c8d455a36481b2f
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosutils/+/3173634
Tested-by: Joseph Sussman <josephsussman@google.com>
Auto-Submit: Joseph Sussman <josephsussman@google.com>
Reviewed-by: Alex Klein <saklein@chromium.org>
Reviewed-by: Ilja H. Friedel <ihf@chromium.org>
Commit-Queue: Joseph Sussman <josephsussman@google.com>
1 file changed