public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
* [PATCH mtd-utils] mtd: tests: check erase block count in page test
@ 2018-03-03 22:39 Stefan Agner
  2018-03-04  9:16 ` Boris Brezillon
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Stefan Agner @ 2018-03-03 22:39 UTC (permalink / raw)
  To: boris.brezillon
  Cc: computersforpeace, dwmw2, marek.vasut, cyrille.pitchen, richard,
	linux-mtd, stefan

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>
---
 tests/mtd-tests/nandpagetest.c | 8 ++++++--
 1 file 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;
-- 
2.16.2

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2018-03-18 21:24 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-03-03 22:39 [PATCH mtd-utils] mtd: tests: check erase block count in page test Stefan Agner
2018-03-04  9:16 ` Boris Brezillon
2018-03-05 11:27 ` David Oberhollenzer
2018-03-18 21:23 ` Boris Brezillon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox