From b3df1390dc8949cf909d2a037acfc56793bb3380 Mon Sep 17 00:00:00 2001 From: Jack Rosenthal Date: Thu, 21 Oct 2021 13:11:56 -0600 Subject: flashrom_tester: Use elogtool to list firmware eventlog Mosys is dropping the eventlog command, in favor of the elogtool command provided in coreboot. The output is compatible with what mosys used to output. Signed-off-by: Jack Rosenthal Change-Id: I8c4be82fed28b6a19746e6b93fafce23bd8ede5d Reviewed-on: https://review.coreboot.org/c/flashrom/+/58527 Tested-by: build bot (Jenkins) Reviewed-by: Ricardo Quesada Reviewed-by: Angel Pons Reviewed-by: Edward O'Callaghan --- util/flashrom_tester/src/cros_sysinfo.rs | 8 ++++---- util/flashrom_tester/src/tests.rs | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/util/flashrom_tester/src/cros_sysinfo.rs b/util/flashrom_tester/src/cros_sysinfo.rs index ddb08026..4d1b347f 100644 --- a/util/flashrom_tester/src/cros_sysinfo.rs +++ b/util/flashrom_tester/src/cros_sysinfo.rs @@ -61,13 +61,13 @@ pub fn bios_info() -> IoResult { } pub fn eventlog_list() -> Result { - mosys_dispatch(&["eventlog", "list"]) + elogtool_dispatch(&["list"]) } -fn mosys_dispatch + Debug>(args: &[S]) -> IoResult { - info!("mosys_dispatch() running: /usr/sbin/mosys {:?}", args); +fn elogtool_dispatch + Debug>(args: &[S]) -> IoResult { + info!("elogtool_dispatch() running: /usr/bin/elogtool {:?}", args); - let output = Command::new("/usr/sbin/mosys") + let output = Command::new("/usr/bin/elogtool") .args(args) .stdin(Stdio::null()) .output()?; diff --git a/util/flashrom_tester/src/tests.rs b/util/flashrom_tester/src/tests.rs index 9ef98e5c..86c0da5b 100644 --- a/util/flashrom_tester/src/tests.rs +++ b/util/flashrom_tester/src/tests.rs @@ -234,13 +234,13 @@ fn lock_test(env: &mut TestEnv) -> TestResult { fn elog_sanity_test(env: &mut TestEnv) -> TestResult { // Check that the elog contains *something*, as an indication that Coreboot - // is actually able to write to the Flash. Because this invokes mosys on the - // host, it doesn't make sense to run for other chips. + // is actually able to write to the Flash. Because this invokes elogtool on + // the host, it doesn't make sense to run for other chips. if env.chip_type() != FlashChip::HOST { info!("Skipping ELOG sanity check for non-host chip"); return Ok(()); } - // mosys reads the flash, it should be back in the golden state + // elogtool reads the flash, it should be back in the golden state env.ensure_golden()?; // Output is one event per line, drop empty lines in the interest of being defensive. let event_count = cros_sysinfo::eventlog_list()? -- cgit v1.2.3