summaryrefslogtreecommitdiff
path: root/tests/futility/test_update.sh
diff options
context:
space:
mode:
authorHung-Te Lin <hungte@chromium.org>2018-08-22 22:29:27 +0800
committerchrome-bot <chrome-bot@chromium.org>2018-09-05 09:15:18 -0700
commit1d4e02d8bab3f0aff945dcb6a3d828af53472b64 (patch)
tree966001f2f720243bfe0d0012ec61c5a3a9aa494d /tests/futility/test_update.sh
parent48e48b777a8e8ec7603829805b3939b8d771f0c8 (diff)
downloadvboot-1d4e02d8bab3f0aff945dcb6a3d828af53472b64.tar.gz
futility: cmd_update: Add vboot1 updater logic
There are still many devices running vboot1 and we need to support them as well. There is no way to determine if a firmware is vboot2 or not, so we can only rely on the system property "fw_vboot2". If fw_vboot2 is 0, then we should always update section B and compare content with section A. BUG=chromium:875551 TEST=make futil; tests/futility/run_test_scripts.sh $(pwd)/build/futility BRANCH=None Change-Id: Iefdcb81099914c2183c627a33eb73678d1269bc1 Signed-off-by: Hung-Te Lin <hungte@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1184952 Reviewed-by: Randall Spangler <rspangler@chromium.org>
Diffstat (limited to 'tests/futility/test_update.sh')
-rwxr-xr-xtests/futility/test_update.sh17
1 files changed, 13 insertions, 4 deletions
diff --git a/tests/futility/test_update.sh b/tests/futility/test_update.sh
index bc2a2ec9..3093e25d 100755
--- a/tests/futility/test_update.sh
+++ b/tests/futility/test_update.sh
@@ -79,7 +79,7 @@ test_update() {
cmp "${TMP}.emu" "${expected}"
}
-# --sys_props: mainfw_act, [wp_hw, wp_sw]
+# --sys_props: mainfw_act, is_vboot2, [wp_hw, wp_sw]
# Test Full update.
test_update "Full update" \
@@ -94,12 +94,21 @@ test_update "RW update" \
# Test Try-RW update (vboot2).
test_update "RW update (A->B)" \
"${FROM_IMAGE}" "${TMP}.expected.b" \
- -i "${TO_IMAGE}" -t --wp=1 --sys_props 0
+ -i "${TO_IMAGE}" -t --wp=1 --sys_props 0,1
test_update "RW update (B->A)" \
"${FROM_IMAGE}" "${TMP}.expected.a" \
- -i "${TO_IMAGE}" -t --wp=1 --sys_props 1
+ -i "${TO_IMAGE}" -t --wp=1 --sys_props 1,1
test_update "RW update -> fallback to RO+RW Full update" \
"${FROM_IMAGE}" "${TMP}.expected.full" \
- -i "${TO_IMAGE}" -t --wp=0 --sys_props 1
+ -i "${TO_IMAGE}" -t --wp=0 --sys_props 1,1
+
+# Test Try-RW update (vboot1).
+test_update "RW update (vboot1, A->B)" \
+ "${FROM_IMAGE}" "${TMP}.expected.b" \
+ -i "${TO_IMAGE}" -t --wp=1 --sys_props 0,0
+
+test_update "RW update (vboot1, B->B)" \
+ "${FROM_IMAGE}" "${TMP}.expected.b" \
+ -i "${TO_IMAGE}" -t --wp=1 --sys_props 1,0