diff options
author | Sam McNally <sammc@chromium.org> | 2022-11-23 19:44:27 +1100 |
---|---|---|
committer | Chromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com> | 2022-12-01 01:36:31 +0000 |
commit | 7279d8095bd06e435d8ae9abd0bf541f3d67c11f (patch) | |
tree | 21cb528348e51bf76cc63c1c090a9ca7a10d5355 /tests | |
parent | e952b9017fab97d0ff480102c569272ff5f56d27 (diff) | |
download | vboot-7279d8095bd06e435d8ae9abd0bf541f3d67c11f.tar.gz |
futility: updater: Only apply the preserve_me quirk for autoupdates.
The preserve_me applies for all non-factory updates for firmware with
the quirk enabled. It was only really intended to apply to firmware
updates during autoupdates, that is --mode=autoupdate. Instead, we
checked for an archive, which is always set, possibly a fallback
directory archive rather than an archive file, resulting in it being
used except for --mode=factory. Switch the condition to TRY_UPDATE_AUTO
instead so only --mode=autoupdate enables the preserve_me quirk.
BUG=b:255447297
TEST=futility update -i /tmp/image.bin doesn't apply the quirk
futility update -i /tmp/image.bin -m autoupdate applies the quirk
BRANCH=None
Change-Id: I7459f027a918dc70cbde1bfc6f5da2b549bcc513
Signed-off-by: Sam McNally <sammc@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/4050014
Reviewed-by: Karthikeyan Ramasubramanian <kramasub@google.com>
Reviewed-by: Edward O'Callaghan <quasisec@chromium.org>
Reviewed-by: Yu-Ping Wu <yupingso@chromium.org>
Diffstat (limited to 'tests')
-rwxr-xr-x | tests/futility/test_update.sh | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/tests/futility/test_update.sh b/tests/futility/test_update.sh index f2ca3034..41dd3608 100755 --- a/tests/futility/test_update.sh +++ b/tests/futility/test_update.sh @@ -378,10 +378,25 @@ test_update "Full update (--quirks preserve_me with non-host programmer)" \ -p raiden_debug_spi:target=AP test_update "Full update (--quirks preserve_me)" \ - "${FROM_IMAGE}" "${TMP}.expected.me_preserved" \ + "${FROM_IMAGE}" "${TMP}.expected.full" \ --quirks preserve_me \ -i "${TO_IMAGE}" --wp=0 --sys_props 0,0x10001,1 +test_update "Full update (--quirks preserve_me, autoupdate)" \ + "${FROM_IMAGE}" "${TMP}.expected.me_preserved" \ + --quirks preserve_me -m autoupdate \ + -i "${TO_IMAGE}" --wp=0 --sys_props 0,0x10001,1 + +test_update "Full update (--quirks preserve_me, deferupdate_hold)" \ + "${FROM_IMAGE}" "${TMP}.expected.me_preserved" \ + --quirks preserve_me -m deferupdate_hold \ + -i "${TO_IMAGE}" --wp=0 --sys_props 0,0x10001,1 + +test_update "Full update (--quirks preserve_me, factory)" \ + "${FROM_IMAGE}" "${TMP}.expected.full" \ + --quirks preserve_me -m factory \ + -i "${TO_IMAGE}" --wp=0 --sys_props 0,0x10001,1 + # Test archive and manifest. CL_TAG is for custom_label_tag. A="${TMP}.archive" mkdir -p "${A}/bin" |