Anastasia Klimchuk has uploaded this change for review.

View Change

[WIP] Erase blocks are selected smaller than expected

Change-Id: I47851d2b6106075111babf8c3535e5394cbbe0f9
Signed-off-by: Anastasia Klimchuk <aklm@flashrom.org>
---
M tests/erase_func_algo.c
1 file changed, 5 insertions(+), 4 deletions(-)

git pull ssh://review.coreboot.org:29418/flashrom refs/changes/23/82723/1
diff --git a/tests/erase_func_algo.c b/tests/erase_func_algo.c
index b0969c2..83f27b6 100644
--- a/tests/erase_func_algo.c
+++ b/tests/erase_func_algo.c
@@ -415,11 +415,11 @@
* Test case #6
*
* Initial vs written: 7 bytes the same, 1 bytes different, 8 bytes the same.
- * One layout region covering the whole chip.
+ * Layout regions of size 2+4+10b.
* Chip with eraseblocks 1, 2, 4, 8, 16.
*/
.chip = &chip_1_2_4_8_16,
- .regions = {{0, MIN_REAL_CHIP_SIZE - 1, "whole chip"}},
+ .regions = {{0, 1, "reg1"}, {2, 5, "reg2"}, {6, 15, "reg3"}, {15, MIN_REAL_CHIP_SIZE - 1, "tail"}},
.initial_buf = {0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x1d,
0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7, 0xa8},
.erased_buf = {ERASE_VALUE, ERASE_VALUE, ERASE_VALUE, ERASE_VALUE,
@@ -428,8 +428,9 @@
ERASE_VALUE, ERASE_VALUE, ERASE_VALUE, ERASE_VALUE},
.written_buf = {0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0xdd,
0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7, 0xa8},
- .eraseblocks_expected = {{0x0, 0x10, TEST_ERASE_INJECTOR_5}},
- .eraseblocks_expected_ind = 1,
+ .eraseblocks_expected = {{0x6, 0x8, TEST_ERASE_INJECTOR_4}, {0xe, 0x2, TEST_ERASE_INJECTOR_2},
+ {0x2, 0x4, TEST_ERASE_INJECTOR_3}, {0x0, 0x2, TEST_ERASE_INJECTOR_2}},
+ .eraseblocks_expected_ind = 4,
.erase_test_name = "Erase test case #6",
.write_test_name = "Write test case #6",
}, {

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

Gerrit-MessageType: newchange
Gerrit-Project: flashrom
Gerrit-Branch: main
Gerrit-Change-Id: I47851d2b6106075111babf8c3535e5394cbbe0f9
Gerrit-Change-Number: 82723
Gerrit-PatchSet: 1
Gerrit-Owner: Anastasia Klimchuk <aklm@chromium.org>