summaryrefslogtreecommitdiff
path: root/tests/mtd-tests/flash_readtest.c
diff options
context:
space:
mode:
authorRalph Siemsen <ralph.siemsen@linaro.org>2021-12-02 09:38:52 -0500
committerDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2021-12-06 01:47:02 +0100
commit981d198cfc3545bb8226c336fdf001f067468e19 (patch)
tree25e3654a85c1bb831a04bc5c0abf0d971eb7f96c /tests/mtd-tests/flash_readtest.c
parenta2c6bbcf2f8e32532e64350ab76609e5db3c431b (diff)
mtd-tests: use pages during readtest and stress
Same fix as a2c6bbc ("mtd-tests: Read and write pages during speed tests") but applied to flash_readtest and flash_stress. Resolves failure of flash_readtest when subpages are present. The test reads a (sub)page followed by the entire OOB. Upon reaching the 2nd subpage, the OOB read fails because it is beyond the end of OOB. Signed-off-by: Ralph Siemsen <ralph.siemsen@linaro.org> Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
Diffstat (limited to 'tests/mtd-tests/flash_readtest.c')
-rw-r--r--tests/mtd-tests/flash_readtest.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/mtd-tests/flash_readtest.c b/tests/mtd-tests/flash_readtest.c
index c5fabc9..b4f4e10 100644
--- a/tests/mtd-tests/flash_readtest.c
+++ b/tests/mtd-tests/flash_readtest.c
@@ -227,7 +227,7 @@ int main(int argc, char **argv)
puts("not NAND flash, assume page size is 512 bytes.");
pgsize = 512;
} else {
- pgsize = mtd.subpage_size;
+ pgsize = mtd.min_io_size;
}
pgcnt = mtd.eb_size / pgsize;