[M] Change in flashrom[main]: flashrom_tester: Fix partial_lock_test on libflashrom

Attention is currently required from: David Wu, Edward O'Callaghan, Evan Benn, Hsuan-ting Chen. Hello Anastasia Klimchuk, David Wu, Edward O'Callaghan, Evan Benn, Hsuan Ting Chen, build bot (Jenkins), I'd like you to reexamine a change. Please visit https://review.coreboot.org/c/flashrom/+/79304?usp=email to look at the new patch set (#4). The following approvals got outdated and were removed: Verified+1 by build bot (Jenkins) Change subject: flashrom_tester: Fix partial_lock_test on libflashrom ...................................................................... flashrom_tester: Fix partial_lock_test on libflashrom partial_lock_test (Lock_top_quad, Lock_bottom_quad, Lock_bottom_half, and Lock_top_half) tries to: 1. Disable HWWP 2. Lock partial 3. Enable HWWP 4. Try to write the locked partial and expect a failure ... The 4th step only works on flashrom binary since the binary will set FLASHROM_FLAG_VERIFY_AFTER_WRITE=1 by default and it will error out while verifying. But libflashrom does not set any flag beforehand, so it has FLASHROM_FLAG_VERIFY_AFTER_WRITE=0 and thus it will think the write command works normally and raise no error. This causes the issue that flashrom_tester with libflashrom has been failed until today. To solve this issue, there are two solutions: 1. Take care of the default flags in libflashrom 2. Always pass --noverify to flashrom binary and verify it afterwards. To make both methods more consistent, I fix it with approach 1. BUG=b:304439294 BRANCH=none TEST=flashrom_tester internal --libflashrom Lock_top_quad Change-Id: I7a8ac0c0984fef3cd9e73ed8d8097ddf429e54b2 Signed-off-by: roccochen@chromium.com <roccochen@chromium.org> --- M bindings/rust/libflashrom/src/lib.rs M util/flashrom_tester/Cargo.toml M util/flashrom_tester/flashrom/src/cmd.rs M util/flashrom_tester/flashrom/src/flashromlib.rs M util/flashrom_tester/flashrom/src/lib.rs M util/flashrom_tester/src/tester.rs 6 files changed, 125 insertions(+), 2 deletions(-) git pull ssh://review.coreboot.org:29418/flashrom refs/changes/04/79304/4 -- To view, visit https://review.coreboot.org/c/flashrom/+/79304?usp=email To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings Gerrit-Project: flashrom Gerrit-Branch: main Gerrit-Change-Id: I7a8ac0c0984fef3cd9e73ed8d8097ddf429e54b2 Gerrit-Change-Number: 79304 Gerrit-PatchSet: 4 Gerrit-Owner: Hsuan-ting Chen <roccochen@google.com> Gerrit-Reviewer: Anastasia Klimchuk <aklm@chromium.org> Gerrit-Reviewer: David Wu <david_wu@quanta.corp-partner.google.com> Gerrit-Reviewer: Edward O'Callaghan <quasisec@chromium.org> Gerrit-Reviewer: Evan Benn <evanbenn@gmail.com> Gerrit-Reviewer: build bot (Jenkins) <no-reply@coreboot.org> Gerrit-CC: Hsuan Ting Chen <roccochen@chromium.org> Gerrit-CC: Nikolai Artemiev <nartemiev@chromium.org> Gerrit-Attention: David Wu <david_wu@quanta.corp-partner.google.com> Gerrit-Attention: Evan Benn <evanbenn@gmail.com> Gerrit-Attention: Hsuan-ting Chen <roccochen@google.com> Gerrit-Attention: Edward O'Callaghan <quasisec@chromium.org> Gerrit-MessageType: newpatchset
participants (1)
-
Hsuan-ting Chen (Code Review)