update_payload: Fix larger source issue
the _CheckOperations() function passes the new usable partition size as the old
usable partition size. If the source image is larger than the target image,
this will be errornous as some checks fail.
BUG=chromium:773336
TEST=scripts/paycheck.py --check delta.bin (10002.0.0 reef -> 10019.0.0 reef)
Change-Id: I8c30129831daff8e70df3dcb9639ff240e4a37ba
Reviewed-on: https://chromium-review.googlesource.com/713463
Commit-Ready: Amin Hassani <ahassani@chromium.org>
Tested-by: Amin Hassani <ahassani@chromium.org>
Reviewed-by: Amin Hassani <ahassani@chromium.org>
diff --git a/scripts/update_payload/checker_unittest.py b/scripts/update_payload/checker_unittest.py
index a0a5056..2e1efeb 100755
--- a/scripts/update_payload/checker_unittest.py
+++ b/scripts/update_payload/checker_unittest.py
@@ -982,8 +982,8 @@
payload_checker.payload_type = checker._TYPE_FULL
report = checker._PayloadReport()
- args = (payload_checker.payload.manifest.install_operations, report,
- 'foo', 0, rootfs_part_size, rootfs_part_size, 0, False)
+ args = (payload_checker.payload.manifest.install_operations, report, 'foo',
+ 0, rootfs_part_size, rootfs_part_size, rootfs_part_size, 0, False)
if fail_nonexhaustive_full_update:
self.assertRaises(update_payload.PayloadError,
payload_checker._CheckOperations, *args)