Attention is currently required from: Hsuan Ting Chen.

Hsuan-ting Chen would like Hsuan Ting Chen to review this change.

View Change

flashrom_tester: Drop technical debt

Drop `-p host` ChromeOS miss-feature and use `-p internal` instead.

BUG=b:296978620
BRANCH=none
TEST=run flashrom-tester with newer flashrom

Change-Id: I1ea174c1760fee3e41a2ef0e9779badf0c51298d
Signed-off-by: roccochen@chromium.com <roccochen@chromium.org>
---
M util/flashrom_tester/flashrom/src/lib.rs
M util/flashrom_tester/src/main.rs
M util/flashrom_tester/src/tests.rs
3 files changed, 7 insertions(+), 7 deletions(-)

git pull ssh://review.coreboot.org:29418/flashrom refs/changes/03/79303/1
diff --git a/util/flashrom_tester/flashrom/src/lib.rs b/util/flashrom_tester/flashrom/src/lib.rs
index 41393e8..e2c9149 100644
--- a/util/flashrom_tester/flashrom/src/lib.rs
+++ b/util/flashrom_tester/flashrom/src/lib.rs
@@ -51,19 +51,19 @@

#[derive(Copy, Clone, PartialEq, Eq, Debug)]
pub enum FlashChip {
- HOST,
+ INTERNAL,
}

impl FlashChip {
pub fn from(s: &str) -> Result<FlashChip, &str> {
match s {
- "host" => Ok(FlashChip::HOST),
+ "internal" => Ok(FlashChip::INTERNAL),
_ => Err("cannot convert str to enum"),
}
}
pub fn to(fc: FlashChip) -> &'static str {
match fc {
- FlashChip::HOST => "host",
+ FlashChip::INTERNAL => "internal",
}
}

@@ -80,7 +80,7 @@
/// disabled.
pub fn can_control_hw_wp(&self) -> bool {
match self {
- FlashChip::HOST => true,
+ FlashChip::INTERNAL => true,
}
}
}
diff --git a/util/flashrom_tester/src/main.rs b/util/flashrom_tester/src/main.rs
index b8a2581..3035ae5 100644
--- a/util/flashrom_tester/src/main.rs
+++ b/util/flashrom_tester/src/main.rs
@@ -82,7 +82,7 @@
.arg(
Arg::with_name("ccd_target_type")
.required(true)
- .possible_values(&["host"]),
+ .possible_values(&["internal"]),
)
.arg(
Arg::with_name("print-layout")
diff --git a/util/flashrom_tester/src/tests.rs b/util/flashrom_tester/src/tests.rs
index 721a789..d1e9d61 100644
--- a/util/flashrom_tester/src/tests.rs
+++ b/util/flashrom_tester/src/tests.rs
@@ -219,8 +219,8 @@
/// is actually able to write to the Flash. This only makes sense for chips
/// running Coreboot, which we assume is just host.
fn elog_sanity_test(env: &mut TestEnv) -> TestResult {
- if env.chip_type() != FlashChip::HOST {
- info!("Skipping ELOG sanity check for non-host chip");
+ if env.chip_type() != FlashChip::INTERNAL {
+ info!("Skipping ELOG sanity check for non-internal chip");
return Ok(());
}
// flash should be back in the golden state

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

Gerrit-Project: flashrom
Gerrit-Branch: main
Gerrit-Change-Id: I1ea174c1760fee3e41a2ef0e9779badf0c51298d
Gerrit-Change-Number: 79303
Gerrit-PatchSet: 1
Gerrit-Owner: Hsuan-ting Chen <roccochen@google.com>
Gerrit-Reviewer: Hsuan Ting Chen <roccochen@chromium.org>
Gerrit-Attention: Hsuan Ting Chen <roccochen@chromium.org>
Gerrit-MessageType: newchange