summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorHung-Te Lin <hungte@chromium.org>2018-09-17 17:47:25 +0800
committerchrome-bot <chrome-bot@chromium.org>2018-09-18 10:31:02 -0700
commit0828bde7b1f0e932c2db0884cb6894c422672666 (patch)
tree972c9c7e32ba9a1686cafb09552d7d887a8f877d /tests
parentb6cd64b799f94ef2fcc1f585939c4fe8c74a4d02 (diff)
downloadvboot-0828bde7b1f0e932c2db0884cb6894c422672666.tar.gz
futility: update: Fix update failure in factory mode due to wrong WP logic
In --mode=factory, we should fail if write protection is enabled. Also added an unit test for the case. BRANCH=None BUG=b:115764295 TEST=make futil; tests/futility/run_test_scripts.sh $(pwd)/build/futility Change-Id: I6c693e470a034554b1f4a3cb16cfbf974ae6f54b Signed-off-by: Hung-Te Lin <hungte@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1226587 Reviewed-by: Marco Chen <marcochen@chromium.org>
Diffstat (limited to 'tests')
-rwxr-xr-xtests/futility/test_update.sh9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/futility/test_update.sh b/tests/futility/test_update.sh
index 44530abb..119974f1 100755
--- a/tests/futility/test_update.sh
+++ b/tests/futility/test_update.sh
@@ -220,6 +220,15 @@ test_update "RW update (vboot1, B->B)" \
"${FROM_IMAGE}" "${TMP}.expected.b" \
-i "${TO_IMAGE}" -t --wp=1 --sys_props 1,0 --sys_props 0,0x10001,0
+# Test 'factory mode'
+test_update "Factory mode update (WP=0)" \
+ "${FROM_IMAGE}" "${TMP}.expected.full" \
+ -i "${TO_IMAGE}" --wp=0 --sys_props 0,0x10001,1
+
+test_update "Factory mode update (WP=1)" \
+ "${FROM_IMAGE}" "!needs WP disabled" \
+ -i "${TO_IMAGE}" --wp=1 --sys_props 0,0x10001,1
+
# Test legacy update
test_update "Legacy update" \
"${FROM_IMAGE}" "${TMP}.expected.legacy" \