Edward O'Callaghan has submitted this change. ( https://review.coreboot.org/c/flashrom/+/69400 )
(
4 is the latest approved patch-set. No files were changed between the latest approved patch-set and the submitted one. )Change subject: flashrom_tester: lock_test: Make the logic clear and explicit ......................................................................
flashrom_tester: lock_test: Make the logic clear and explicit
Document clearly what the test is doing and expects. Do not use the push() function as it confuses the logs in the case of error.
BUG=b:258357944 BRANCH=None TEST=flashrom_tester --libflashrom host Lock
Change-Id: Ibad559a8ff9696fd91f45bca9d9ceb6e90c41393 Signed-off-by: Evan Benn evanbenn@chromium.org Reviewed-on: https://review.coreboot.org/c/flashrom/+/69400 Reviewed-by: Peter Marheine pmarheine@chromium.org Reviewed-by: Edward O'Callaghan quasisec@chromium.org Tested-by: build bot (Jenkins) no-reply@coreboot.org --- M util/flashrom_tester/src/tests.rs 1 file changed, 25 insertions(+), 4 deletions(-)
Approvals: build bot (Jenkins): Verified Edward O'Callaghan: Looks good to me, approved Peter Marheine: Looks good to me, but someone else must approve
diff --git a/util/flashrom_tester/src/tests.rs b/util/flashrom_tester/src/tests.rs index af34208..5cbe9d2 100644 --- a/util/flashrom_tester/src/tests.rs +++ b/util/flashrom_tester/src/tests.rs @@ -199,12 +199,12 @@ }
env.wp.set_hw(false)?.set_sw(true)?; - // Toggling software WP off should work when hardware is off. - // Then enable again for another go. - env.wp.push().set_sw(false)?; + // Toggling software WP off should work when hardware WP is off. + // Then enable software WP again for the next test. + env.wp.set_sw(false)?.set_sw(true)?;
+ // Toggling software WP off should not work when hardware WP is on. env.wp.set_hw(true)?; - // Clearing should fail when hardware is enabled if env.wp.set_sw(false).is_ok() { return Err("Software WP was reset despite hardware WP being enabled".into()); }