mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2026-01-07 16:11:43 +00:00
test: nvmem_vars: drop redundant erase_flash() invocations
There is no need to invoke erase_flash() before load_flash(), as load_flash() invokes that function itself. BRANCH=none BUG=none TEST=make buildall -j still passes Change-Id: Ic4aba9f680402418ec6268d6ed5800065a09110b Signed-off-by: Vadim Bendebury <vbendeb@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/426087 Reviewed-by: Bill Richardson <wfrichar@chromium.org> Reviewed-by: Mary Ruthven <mruthven@chromium.org>
This commit is contained in:
committed by
chrome-bot
parent
2ddd8d8e5f
commit
8734b70ff5
@@ -186,12 +186,10 @@ static int check_init(void)
|
||||
[513] = 0x01, [514] = 0x52, /* 513-598 */
|
||||
[599] = 0xff };
|
||||
|
||||
erase_flash();
|
||||
load_flash(good, sizeof(good));
|
||||
TEST_ASSERT(initvars() == EC_SUCCESS);
|
||||
TEST_ASSERT(verify_flash(good, sizeof(good)));
|
||||
|
||||
erase_flash();
|
||||
load_flash(empty, sizeof(empty));
|
||||
TEST_ASSERT(initvars() == EC_SUCCESS);
|
||||
TEST_ASSERT(verify_flash(empty, sizeof(empty)));
|
||||
@@ -201,27 +199,22 @@ static int check_init(void)
|
||||
TEST_ASSERT(initvars() == EC_SUCCESS);
|
||||
TEST_ASSERT(verify_flash(empty, sizeof(empty)));
|
||||
|
||||
erase_flash();
|
||||
load_flash(bad_key, sizeof(bad_key));
|
||||
TEST_ASSERT(initvars() == EC_SUCCESS);
|
||||
TEST_ASSERT(verify_flash(empty, sizeof(empty)));
|
||||
|
||||
erase_flash();
|
||||
load_flash(bad_val, sizeof(bad_val));
|
||||
TEST_ASSERT(initvars() == EC_SUCCESS);
|
||||
TEST_ASSERT(verify_flash(empty, sizeof(empty)));
|
||||
|
||||
erase_flash();
|
||||
load_flash(too_big, sizeof(too_big));
|
||||
TEST_ASSERT(initvars() == EC_SUCCESS);
|
||||
TEST_ASSERT(verify_flash(empty, sizeof(empty)));
|
||||
|
||||
erase_flash();
|
||||
load_flash(just_right, sizeof(just_right));
|
||||
TEST_ASSERT(initvars() == EC_SUCCESS);
|
||||
TEST_ASSERT(verify_flash(just_right, sizeof(just_right)));
|
||||
|
||||
erase_flash();
|
||||
load_flash(not_right, sizeof(not_right));
|
||||
TEST_ASSERT(initvars() == EC_SUCCESS);
|
||||
TEST_ASSERT(verify_flash(empty, sizeof(empty)));
|
||||
|
||||
Reference in New Issue
Block a user