From 0bb86017adc5bc776ba863c8f5ea6821ce4d9f88 Mon Sep 17 00:00:00 2001 From: Patrick Georgi Date: Tue, 15 Sep 2020 17:42:42 +0200 Subject: 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 Reviewed-on: https://review.coreboot.org/c/flashrom/+/45431 Tested-by: build bot (Jenkins) Reviewed-by: Angel Pons --- tests/spi25.c | 1 + 1 file changed, 1 insertion(+) (limited to 'tests/spi25.c') diff --git a/tests/spi25.c b/tests/spi25.c index aa1eea01..362f5c69 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)); -- cgit v1.2.3