aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Scull <ascull@google.com>2018-05-21 15:28:18 +0100
committerAndrew Scull <ascull@google.com>2018-05-21 15:28:18 +0100
commit2f98ff8e179e66f389e48f9535ace15083592ffc (patch)
treec0413b6a372bc269a378e30d4d692c1d58890ac4
parentbc4a22c258d9950793fe3add448f9dbd76808605 (diff)
downloadsystem-test-harness-2f98ff8e179e66f389e48f9535ace15083592ffc.tar.gz
Weaver: regression test for data wipe behaviour
Using explicit slot IDs is done to ensure the slots are in the same SFS record. Thanks to SFS, the flash wear will be spread evenly. Bug: 79111655 Change-Id: Iebf4dfb7104b84b43574663457886c6892ba4cc1
-rw-r--r--src/weaver_tests.cc9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/weaver_tests.cc b/src/weaver_tests.cc
index c14ff0b..9471b02 100644
--- a/src/weaver_tests.cc
+++ b/src/weaver_tests.cc
@@ -321,4 +321,13 @@ TEST_F(WeaverTest, ProductionResetWipesUserData) {
testRead(__STAMP__, WeaverTest::slot, TEST_KEY, ZERO_VALUE);
}
+// Regression tests
+TEST_F(WeaverTest, WipeUserDataWriteSlot0ReadSlot1) {
+ testWrite(__STAMP__, 0, TEST_KEY, TEST_VALUE);
+ testWrite(__STAMP__, 1, TEST_KEY, TEST_VALUE);
+ ASSERT_TRUE(nugget_tools::WipeUserData(client.get()));
+ testWrite(__STAMP__, 0, TEST_KEY, TEST_VALUE);
+ testRead(__STAMP__, 1, TEST_KEY, ZERO_VALUE);
+}
+
} // namespace