Edward O'Callaghan submitted this change.
flashrom_tester: Simplify wp_toggle_test and rename
Rename wp_toggle_test to wp_region_list_test. Make it test one thing,
wp_list. lock_test does the test of set_hw/set_sw functionality so that
was redundant here.
BUG=b:235916336
BRANCH=None
TEST=None
Change-Id: I314aa8d9708c39cc162a8d5e95ca3e019c2fb5b8
Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/71971
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Peter Marheine <pmarheine@chromium.org>
Reviewed-by: Edward O'Callaghan <quasisec@chromium.org>
---
M util/flashrom_tester/src/tests.rs
1 file changed, 24 insertions(+), 5 deletions(-)
diff --git a/util/flashrom_tester/src/tests.rs b/util/flashrom_tester/src/tests.rs
index 1f65b04..8369a94 100644
--- a/util/flashrom_tester/src/tests.rs
+++ b/util/flashrom_tester/src/tests.rs
@@ -97,7 +97,7 @@
&("Get_device_name", get_device_name_test),
&("Coreboot_ELOG_sanity", elog_sanity_test),
&("Host_is_ChromeOS", host_is_chrome_test),
- &("Toggle_WP", wp_toggle_test),
+ &("WP_Region_List", wp_region_list_test),
&("Erase_and_Write", erase_write_test),
&("Fail_to_verify", verify_fail_test),
&("Lock", lock_test),
@@ -160,14 +160,11 @@
/// List the write-protectable regions of flash.
/// NOTE: This is not strictly a 'test' as it is allowed to fail on some platforms.
/// However, we will warn when it does fail.
-fn wp_toggle_test(env: &mut TestEnv) -> TestResult {
+fn wp_region_list_test(env: &mut TestEnv) -> TestResult {
match env.cmd.wp_list() {
Ok(list_str) => info!("\n{}", list_str),
Err(e) => warn!("{}", e),
};
- // Fails if unable to set either one
- env.wp.set_hw(false)?;
- env.wp.set_sw(false)?;
Ok(())
}
To view, visit change 71971. To unsubscribe, or for help writing mail filters, visit settings.