Patrick Georgi has uploaded this change for review. ( https://review.coreboot.org/c/flashrom/+/45431 )
Change subject: tests: Clear ID cache before trying to fetch chip ID a second time ......................................................................
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 --- M tests/spi25.c 1 file changed, 1 insertion(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/flashrom refs/changes/31/45431/1
diff --git a/tests/spi25.c b/tests/spi25.c index aa1eea0..362f5c6 100644 --- a/tests/spi25.c +++ b/tests/spi25.c @@ -129,6 +129,7 @@ (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));
Angel Pons has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/45431 )
Change subject: tests: Clear ID cache before trying to fetch chip ID a second time ......................................................................
Patch Set 1: Code-Review+2
(1 comment)
https://review.coreboot.org/c/flashrom/+/45431/1/tests/spi25.c File tests/spi25.c:
https://review.coreboot.org/c/flashrom/+/45431/1/tests/spi25.c@132 PS1, Line 132: clear_spi_id_cache(); Shouldn't this be done everywhere?
Patrick Georgi has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/45431 )
Change subject: tests: Clear ID cache before trying to fetch chip ID a second time ......................................................................
Patch Set 1:
(1 comment)
https://review.coreboot.org/c/flashrom/+/45431/1/tests/spi25.c File tests/spi25.c:
https://review.coreboot.org/c/flashrom/+/45431/1/tests/spi25.c@132 PS1, Line 132: clear_spi_id_cache();
Shouldn't this be done everywhere?
perhaps? This is the only place where it's _needed_ though, so that's where I stopped. In fact, it may be useful to extend the test to check the cache functionality as well (that is, do the same twice and check that the second run doesn't call into spi_send_command at all).
Angel Pons has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/45431 )
Change subject: tests: Clear ID cache before trying to fetch chip ID a second time ......................................................................
Patch Set 1:
(1 comment)
https://review.coreboot.org/c/flashrom/+/45431/1/tests/spi25.c File tests/spi25.c:
https://review.coreboot.org/c/flashrom/+/45431/1/tests/spi25.c@132 PS1, Line 132: clear_spi_id_cache();
perhaps? This is the only place where it's _needed_ though, so that's where I stopped. […]
Ack
Angel Pons has submitted this change. ( https://review.coreboot.org/c/flashrom/+/45431 )
Change subject: tests: Clear ID cache before trying to fetch chip ID a second time ......................................................................
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 --- M tests/spi25.c 1 file changed, 1 insertion(+), 0 deletions(-)
Approvals: build bot (Jenkins): Verified Angel Pons: Looks good to me, approved
diff --git a/tests/spi25.c b/tests/spi25.c index aa1eea0..362f5c6 100644 --- a/tests/spi25.c +++ b/tests/spi25.c @@ -129,6 +129,7 @@ (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));