aboutsummaryrefslogtreecommitdiff
path: root/tests/mtd-tests
diff options
context:
space:
mode:
authorStefan Agner <stefan@agner.ch>2018-03-03 23:39:46 +0100
committerDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2018-03-05 12:22:39 +0100
commit414b71e9f9755e6d49f58eb303abc484115e9048 (patch)
treef5e3342ff7e9839ff51c80af06320b8ad722db34 /tests/mtd-tests
parent9c6173559f95e939e66efb2ec3193d6f3618cf69 (diff)
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: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
Diffstat (limited to 'tests/mtd-tests')
-rw-r--r--tests/mtd-tests/nandpagetest.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/tests/mtd-tests/nandpagetest.c b/tests/mtd-tests/nandpagetest.c
index c6812df..115cedb 100644
--- a/tests/mtd-tests/nandpagetest.c
+++ b/tests/mtd-tests/nandpagetest.c
@@ -551,8 +551,12 @@ int main(int argc, char **argv)
}
printf("verified %u eraseblocks\n", i);
- if (crosstest())
- goto out;
+ if (ebcnt > 1) {
+ if (crosstest())
+ goto out;
+ } else {
+ printf("skipping erasecrosstest, 2 erase blocks needed\n");
+ }
if (erasecrosstest())
goto out;