summaryrefslogtreecommitdiffstats
path: root/tests/spi25.c
diff options
context:
space:
mode:
authorPatrick Georgi <pgeorgi@google.com>2020-09-15 17:42:42 +0200
committerAngel Pons <th3fanbus@gmail.com>2020-09-16 09:40:12 +0000
commit0bb86017adc5bc776ba863c8f5ea6821ce4d9f88 (patch)
treead196a6133a82d98c192ab3677ad7b90ec32e9a5 /tests/spi25.c
parent3b8fe0f8e907c0ba9f7c7935e950f3e1538d427f (diff)
downloadflashrom-0bb86017adc5bc776ba863c8f5ea6821ce4d9f88.tar.gz
flashrom-0bb86017adc5bc776ba863c8f5ea6821ce4d9f88.tar.bz2
flashrom-0bb86017adc5bc776ba863c8f5ea6821ce4d9f88.zip
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>
Diffstat (limited to 'tests/spi25.c')
-rw-r--r--tests/spi25.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/tests/spi25.c b/tests/spi25.c
index aa1eea012..362f5c69c 100644
--- a/tests/spi25.c
+++ b/tests/spi25.c
@@ -129,6 +129,7 @@ void probe_spi_res2_test_success(void **state)
(void) state; /* unused */
/* setup initial test state. */
+ clear_spi_id_cache();
struct flashctx flashctx = { .chip = &mock_chip };
expect_memory(__wrap_spi_send_command, flash,
&flashctx, sizeof(flashctx));