summaryrefslogtreecommitdiff
path: root/test/nvmem_test.h
diff options
context:
space:
mode:
authorVadim Bendebury <vbendeb@chromium.org>2019-04-29 17:25:45 -0700
committerchrome-bot <chrome-bot@chromium.org>2019-05-01 11:02:59 -0700
commit13089909211c5289c46d22a3cb7fb9b06efcd917 (patch)
treeb77aedebccc921f8f07b86c2dbcadea4ef13315d /test/nvmem_test.h
parent262ded1e01a374537e56160811bdad5763b311a5 (diff)
downloadchrome-ec-13089909211c5289c46d22a3cb7fb9b06efcd917.tar.gz
nvmem: fix delimiter creation during setvar()
The (key, value) objects should not be treated differently from TPM objects when initializing NVMEM from some inconsistent state. Saving of a modified (key, value) object should include the 'incomplete delimiter' phase when the new value has been already saved, but the old value has not yet been eliminated. Added tests verifying various failure modes. BRANCH=cr50, cr50-mp BUG=b:69907320, b:129710256 TEST='make run-nvmem' succeeds Change-Id: Ia53b6cfa2edd59fef28ace6978d752ca3cfbb2aa Signed-off-by: Vadim Bendebury <vbendeb@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1590043 Reviewed-by: Andrey Pronin <apronin@chromium.org>
Diffstat (limited to 'test/nvmem_test.h')
-rw-r--r--test/nvmem_test.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/test/nvmem_test.h b/test/nvmem_test.h
index f8f166dc5e..9e050582ac 100644
--- a/test/nvmem_test.h
+++ b/test/nvmem_test.h
@@ -17,7 +17,9 @@ enum test_failure_mode {
TEST_NO_FAILURE,
TEST_FAIL_WHEN_SAVING,
TEST_FAIL_WHEN_INVALIDATING,
- TEST_FAIL_WHEN_COMPACTING
+ TEST_FAIL_WHEN_COMPACTING,
+ TEST_FAIL_SAVING_VAR,
+ TEST_FAIL_FINALIZING_VAR
};
extern enum test_failure_mode failure_mode;