aboutsummaryrefslogtreecommitdiff
path: root/src/avb_tests.cc
diff options
context:
space:
mode:
authorAndrew Scull <ascull@google.com>2018-03-21 17:39:50 +0000
committerAndrew Scull <ascull@google.com>2018-04-10 15:55:12 +0100
commit57eeb0a2bf8fed39285c54cc00839b7796f019b2 (patch)
tree0061ffe577ea9d5eb5fb8895668ff9819e0ffe00 /src/avb_tests.cc
parent911ab04a509f0633448562077c07b2e37d3c4499 (diff)
downloadsystem-test-harness-57eeb0a2bf8fed39285c54cc00839b7796f019b2.tar.gz
AVB: test factory reset for device lock
This is what we decided so you have to boot to a functioning HLOS to enable the lock. This should help people avoid bricking themselves. Change-Id: Ie6d09b119c8650d22879780c89b76f86f5ebd06c
Diffstat (limited to 'src/avb_tests.cc')
-rw-r--r--src/avb_tests.cc9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/avb_tests.cc b/src/avb_tests.cc
index fea25c6..b72a3cc 100644
--- a/src/avb_tests.cc
+++ b/src/avb_tests.cc
@@ -877,4 +877,13 @@ TEST_F(AvbTest, ProductionResetTestValid)
ASSERT_NO_ERROR(code, "");
}
+TEST_F(AvbTest, WipeUserDataDoesNotLockDeviceLock) {
+ ASSERT_NO_ERROR(SetDeviceLock(0x00), "");
+ ASSERT_TRUE(nugget_tools::WipeUserData(client.get()));
+
+ uint8_t locks[4];
+ GetState(client.get(), nullptr, nullptr, locks);
+ EXPECT_EQ(locks[DEVICE], 0x00);
+}
+
} // namespace