mirror of
https://review.coreboot.org/flashrom.git
synced 2025-06-30 21:52:36 +02:00
flashrom_tester: Add write_file_with_layout positive test
write_file_with_layout test was checking that writing to a region was failing, and assuming that was because write protect is working as expected. Other failures are possible, so check that a write to a non write protected region can succeed. BUG=b:235916336 BRANCH=None TEST=/usr/bin/flashrom_tester --debug host Lock_top_quad Change-Id: I2b220f323e259f5c7bfae06f6cf996b22e264555 Signed-off-by: Evan Benn <evanbenn@chromium.org> Reviewed-on: https://review.coreboot.org/c/flashrom/+/65278 Reviewed-by: Edward O'Callaghan <quasisec@chromium.org> Reviewed-by: Peter Marheine <pmarheine@chromium.org> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:

committed by
Edward O'Callaghan

parent
c42ae261ae
commit
a2fc6185e6
@ -44,6 +44,18 @@ pub enum LayoutNames {
|
||||
BottomQuad,
|
||||
}
|
||||
|
||||
impl LayoutNames {
|
||||
// Return a section that does not overlap
|
||||
pub fn get_non_overlapping_section(&self) -> LayoutNames {
|
||||
match self {
|
||||
LayoutNames::TopQuad => LayoutNames::BottomQuad,
|
||||
LayoutNames::TopHalf => LayoutNames::BottomHalf,
|
||||
LayoutNames::BottomHalf => LayoutNames::TopHalf,
|
||||
LayoutNames::BottomQuad => LayoutNames::TopQuad,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug, PartialEq, Eq, Clone, Copy)]
|
||||
pub struct LayoutSizes {
|
||||
half_sz: i64,
|
||||
|
Reference in New Issue
Block a user