1
0
mirror of https://review.coreboot.org/flashrom.git synced 2025-04-28 23:43:42 +02:00

tests: Clear ID cache before trying to fetch chip ID a second time

Without that, the code never calls into spi_send_command (because
everything's known already) and so the expected return values are
never returned.

Change-Id: Iba6a56774ce5b51e0f7072b4600a9479cdabf8c7
Signed-off-by: Patrick Georgi <pgeorgi@google.com>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/45431
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
This commit is contained in:
Patrick Georgi 2020-09-15 17:42:42 +02:00 committed by Angel Pons
parent 3b8fe0f8e9
commit 0bb86017ad

View File

@ -129,6 +129,7 @@ void probe_spi_res2_test_success(void **state)
(void) state; /* unused */ (void) state; /* unused */
/* setup initial test state. */ /* setup initial test state. */
clear_spi_id_cache();
struct flashctx flashctx = { .chip = &mock_chip }; struct flashctx flashctx = { .chip = &mock_chip };
expect_memory(__wrap_spi_send_command, flash, expect_memory(__wrap_spi_send_command, flash,
&flashctx, sizeof(flashctx)); &flashctx, sizeof(flashctx));