mirror of
https://review.coreboot.org/flashrom.git
synced 2025-04-26 22:52:34 +02:00
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>
This commit is contained in:
parent
f4a9208eee
commit
31c5caa614
@ -97,7 +97,7 @@ pub fn generic<'a, TN: Iterator<Item = &'a str>>(
|
||||
&("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 @@ fn get_device_name_test(env: &mut TestEnv) -> TestResult {
|
||||
/// 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(())
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user