summaryrefslogtreecommitdiff
path: root/scripts/update_payload/format_utils_unittest.py
diff options
context:
space:
mode:
authorYifan Hong <elsk@google.com>2020-09-01 17:20:08 -0700
committerYifan Hong <elsk@google.com>2020-09-08 22:27:36 +0000
commit87029337e3e244440e460a496a1381b533213481 (patch)
tree37acf2daaf5b2bbd717d4b78450e0a7221334bec /scripts/update_payload/format_utils_unittest.py
parentc1c930547968f75be0964f2c48bfe4b2d0e04a92 (diff)
HardwareInterface::IsPartitionUpdateValid: fine grained error
Let the function emit an error code instead of a boolean to indicate details of the error that is encountered. For every partition, if downgrade is detected, emit kPayloadTimestampError. In this case, still check other partitions for more severe errors before returning this error. In some cases, e.g. DeltaArchiveManifest carries a version field that is not a recognized format, or timestamp sysprops in Android is not an integer, report a more severe error. If only downgrade errors are encountered, AllowDowngrade() can still override the result, and proceed with the update; but, AllowDowngrade cannot override those severe errors. Test: update_engine_unittest Bug: 162623577 Bug: 162553432 Change-Id: Ifc2a6fcd66239c755fb4f6528c3d8c6848afcb27
Diffstat (limited to 'scripts/update_payload/format_utils_unittest.py')
0 files changed, 0 insertions, 0 deletions