diff options
author | Evan Benn <evanbenn@chromium.org> | 2022-06-10 16:43:02 +1000 |
---|---|---|
committer | Edward O'Callaghan <quasisec@chromium.org> | 2022-07-21 23:28:50 +0000 |
commit | 4342cc0f14e2945d7642e75e44346c13ca23089b (patch) | |
tree | 1f4b1ab0c6ad1cf14f9085c00c856c606fcd1b72 /util/flashrom_tester/flashrom/src/lib.rs | |
parent | b9e7d20d192ca15c704b2e59dca24d7bc654680b (diff) | |
download | flashrom-4342cc0f14e2945d7642e75e44346c13ca23089b.tar.gz flashrom-4342cc0f14e2945d7642e75e44346c13ca23089b.tar.bz2 flashrom-4342cc0f14e2945d7642e75e44346c13ca23089b.zip |
flashrom_tester: Remove subprocess from elog_sanity_test
Make elog_sanity_test read the elog region itself, instead of calling
out to elogtool. This avoids the need to subprocess and resolves
a deadlock when elogtool attempts to obtain a flash reading lock.
TEST=/usr/bin/flashrom_tester host Coreboot_ELOG_sanity
TEST=flashrom --image RW_ELOG -p host -r /tmp/file.tmp2 # comparison
TEST=hexdump the file and check magic signature == 0x474f4c45
Change-Id: I8ac63e15e063f9c0928e3e185154bb083b367ba9
Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/65119
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Peter Marheine <pmarheine@chromium.org>
Reviewed-by: Edward O'Callaghan <quasisec@chromium.org>
Diffstat (limited to 'util/flashrom_tester/flashrom/src/lib.rs')
-rw-r--r-- | util/flashrom_tester/flashrom/src/lib.rs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/util/flashrom_tester/flashrom/src/lib.rs b/util/flashrom_tester/flashrom/src/lib.rs index 924a71315..fff5863bc 100644 --- a/util/flashrom_tester/flashrom/src/lib.rs +++ b/util/flashrom_tester/flashrom/src/lib.rs @@ -114,6 +114,9 @@ pub trait Flashrom { /// Read the whole flash to the file specified by `path`. fn read(&self, path: &str) -> Result<(), FlashromError>; + /// Read only a region of the flash. + fn read_region(&self, path: &str, region: &str) -> Result<(), FlashromError>; + /// Write the whole flash to the file specified by `path`. fn write(&self, path: &str) -> Result<(), FlashromError>; |