1
0
Fork 0

mtd: tests: check erase block count in page test

When there is only a single erase block, the cross erase test
does not report sensible errors. Warn in case there is only
a single erase block instead of executing the test.

Signed-off-by: Stefan Agner <stefan@agner.ch>
Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com>
hifive-unleashed-5.1
Stefan Agner 2018-03-03 23:26:22 +01:00 committed by Boris Brezillon
parent ac9cd36c7a
commit 148a1a5d74
1 changed files with 7 additions and 3 deletions

View File

@ -435,9 +435,13 @@ static int __init mtd_pagetest_init(void)
if (err)
goto out;
err = erasecrosstest();
if (err)
goto out;
if (ebcnt > 1) {
err = erasecrosstest();
if (err)
goto out;
} else {
pr_info("skipping erasecrosstest, 2 erase blocks needed\n");
}
err = erasetest();
if (err)