Anastasia Klimchuk submitted this change.

View Change

Approvals: Angel Pons: Looks good to me, approved Anastasia Klimchuk: Looks good to me, approved Hsuan-ting Chen: Looks good to me, approved build bot (Jenkins): Verified Evan Benn: Looks good to me, but someone else must approve
flashrom_tester: Correct "WP screw" message

flashrom_tester prints hints on how to modify hardware write protect
state as follows:

...
> connect the battery (and/or open the WP screw)
...
> disconnect the battery (and/or open the WP screw)
...

The first advice should be "[...] close the WP screw".

TEST=`flashrom_tester --flashrom_binary=$(which flashrom) \
internal Erase_and_Write Fail_to_verify`

Change-Id: I45f06db51e92e68bf724b13bdf5b31bba511d270
Signed-off-by: Brian Norris <briannorris@chromium.org>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/82083
Reviewed-by: Hsuan-ting Chen <roccochen@google.com>
Reviewed-by: Evan Benn <evanbenn@gmail.com>
Reviewed-by: Anastasia Klimchuk <aklm@chromium.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
---
M util/flashrom_tester/src/utils.rs
1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/util/flashrom_tester/src/utils.rs b/util/flashrom_tester/src/utils.rs
index 4e8dd7c..017d77d 100644
--- a/util/flashrom_tester/src/utils.rs
+++ b/util/flashrom_tester/src/utils.rs
@@ -101,8 +101,9 @@

pub fn toggle_hw_wp(dis: bool) -> Result<(), String> {
// The easist way to toggle the hardware write-protect is
- // to {dis}connect the battery (and/or open the WP screw).
+ // to {dis}connect the battery (and/or {open,close} the WP screw).
let s = if dis { "dis" } else { "" };
+ let screw_state = if dis { "open" } else { "close" };
// Print a failure message, but not on the first try.
let mut fail_msg = None;
while dis == get_hardware_wp()? {
@@ -112,7 +113,7 @@
fail_msg = Some(format!("Hardware write protect is still {}!", !dis));
// The following message is read by the tast test. Do not modify.
info!("Prompt for hardware WP {}able", s);
- eprintln!(" > {}connect the battery (and/or open the WP screw)", s);
+ eprintln!(" > {}connect the battery (and/or {} the WP screw)", s, screw_state);
pause();
}
Ok(())

To view, visit change 82083. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: flashrom
Gerrit-Branch: main
Gerrit-Change-Id: I45f06db51e92e68bf724b13bdf5b31bba511d270
Gerrit-Change-Number: 82083
Gerrit-PatchSet: 6
Gerrit-Owner: Brian Norris <briannorris@chromium.org>
Gerrit-Reviewer: Anastasia Klimchuk <aklm@chromium.org>
Gerrit-Reviewer: Angel Pons <th3fanbus@gmail.com>
Gerrit-Reviewer: Evan Benn <evanbenn@gmail.com>
Gerrit-Reviewer: Hsuan-ting Chen <roccochen@google.com>
Gerrit-Reviewer: Thomas Heijligen <src@posteo.de>
Gerrit-Reviewer: build bot (Jenkins) <no-reply@coreboot.org>
Gerrit-MessageType: merged