mirror of
https://review.coreboot.org/flashrom.git
synced 2025-07-04 07:15:18 +02:00
flashrom_tester: Call crossystem with write protect argument
crossystem uses flashrom to gather data on some platforms. To avoid firmware lock deadlock, call crossystem before initialising libflashrom. When querying hardware write protect status, provide an argument to crossystem so that only that field is queried. This also avoids the deadlock, and improves performance. BUG=b:239496316 BRANCH=None TEST=on trogdor(arm), grunt(amd), hatch(intel): TEST=flashrom_tester --libflashrom /usr/sbin/flashrom host Coreboot_ELOG_sanity TEST=flashrom_tester /usr/sbin/flashrom host Coreboot_ELOG_sanity Change-Id: I7d94cfc6ccbfbec91f12151eb0004724ccfc4e00 Signed-off-by: Evan Benn <evanbenn@chromium.org> Reviewed-on: https://review.coreboot.org/c/flashrom/+/65962 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Edward O'Callaghan <quasisec@chromium.org>
This commit is contained in:

committed by
Edward O'Callaghan

parent
1d38651865
commit
7346cda9e9
@ -86,6 +86,7 @@ pub fn generic<'a, TN: Iterator<Item = &'a str>>(
|
||||
output_format: OutputFormat,
|
||||
test_names: Option<TN>,
|
||||
terminate_flag: Option<&AtomicBool>,
|
||||
crossystem: String,
|
||||
) -> Result<(), Box<dyn std::error::Error>> {
|
||||
utils::ac_power_warning();
|
||||
|
||||
@ -106,10 +107,7 @@ pub fn generic<'a, TN: Iterator<Item = &'a str>>(
|
||||
}
|
||||
}
|
||||
|
||||
info!(
|
||||
"Record crossystem information.\n{}",
|
||||
utils::collect_crosssystem()?
|
||||
);
|
||||
info!("Record crossystem information.\n{}", crossystem);
|
||||
|
||||
// Register tests to run:
|
||||
let tests: &[&dyn TestCase] = &[
|
||||
|
Reference in New Issue
Block a user