diff options
author | Evan Benn <evanbenn@chromium.org> | 2022-11-09 16:01:58 +1100 |
---|---|---|
committer | Edward O'Callaghan <quasisec@chromium.org> | 2022-11-24 03:29:32 +0000 |
commit | e456b496d2308e7474c21918e35ec9f2d12b9713 (patch) | |
tree | d006c37d8a66feb859e98ecc047b78224e550704 /util | |
parent | d1c7dc0a0a771978cb4ae8e13d16f791f0769914 (diff) | |
download | flashrom-e456b496d2308e7474c21918e35ec9f2d12b9713.tar.gz flashrom-e456b496d2308e7474c21918e35ec9f2d12b9713.tar.bz2 flashrom-e456b496d2308e7474c21918e35ec9f2d12b9713.zip |
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>
Diffstat (limited to 'util')
-rw-r--r-- | util/flashrom_tester/src/tests.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/util/flashrom_tester/src/tests.rs b/util/flashrom_tester/src/tests.rs index af3420887..5cbe9d214 100644 --- a/util/flashrom_tester/src/tests.rs +++ b/util/flashrom_tester/src/tests.rs @@ -199,12 +199,12 @@ fn lock_test(env: &mut TestEnv) -> TestResult { } 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()); } |