diff options
author | Anastasia Klimchuk <aklm@chromium.org> | 2022-01-17 14:27:34 +1100 |
---|---|---|
committer | Edward O'Callaghan <quasisec@chromium.org> | 2022-01-19 22:56:28 +0000 |
commit | 66f72d6ac900708ed02cf125714dbc4325783588 (patch) | |
tree | d2caa159734bf854cd84970fd046c8090129524d /tests/chip.c | |
parent | 3ae04a1204ab724689dadeac0548aadd5e5eb088 (diff) | |
download | flashrom-66f72d6ac900708ed02cf125714dbc4325783588.tar.gz flashrom-66f72d6ac900708ed02cf125714dbc4325783588.tar.bz2 flashrom-66f72d6ac900708ed02cf125714dbc4325783588.zip |
tests: Convert erase chip tests to libflashrom API
As a part of effort to convert command line (and everything else)
to be libflashrom users, chip tests need to be converted as well.
TEST=ninja test
Change-Id: I38529a6b4d79882f50068b3628089b178dbe0a50
Signed-off-by: Anastasia Klimchuk <aklm@chromium.org>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/61137
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Edward O'Callaghan <quasisec@chromium.org>
Diffstat (limited to 'tests/chip.c')
-rw-r--r-- | tests/chip.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/chip.c b/tests/chip.c index 9c06fe70..0ea3a354 100644 --- a/tests/chip.c +++ b/tests/chip.c @@ -19,6 +19,7 @@ #include "chipdrivers.h" #include "flash.h" +#include "libflashrom.h" #include "programmer.h" #define MOCK_CHIP_SIZE (8*MiB) @@ -182,7 +183,7 @@ void erase_chip_test_success(void **state) setup_chip(&flashctx, &layout, &mock_chip, param); printf("Erase chip operation started.\n"); - assert_int_equal(0, do_erase(&flashctx)); + assert_int_equal(0, flashrom_flash_erase(&flashctx)); printf("Erase chip operation done.\n"); teardown(&layout); @@ -204,7 +205,7 @@ void erase_chip_with_dummyflasher_test_success(void **state) setup_chip(&flashctx, &layout, &mock_chip, param_dup); printf("Erase chip operation started.\n"); - assert_int_equal(0, do_erase(&flashctx)); + assert_int_equal(0, flashrom_flash_erase(&flashctx)); printf("Erase chip operation done.\n"); teardown(&layout); |