* [PATCH] mtd: tests: check erase block count in page test
@ 2018-02-26 21:27 Stefan Agner
2018-02-27 21:03 ` Boris Brezillon
0 siblings, 1 reply; 2+ messages in thread
From: Stefan Agner @ 2018-02-26 21:27 UTC (permalink / raw)
To: dwmw2, computersforpeace, boris.brezillon, marek.vasut, richard,
cyrille.pitchen
Cc: linux-mtd, Stefan Agner
When there is only a single erase block, the cross talk 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>
---
drivers/mtd/tests/pagetest.c | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/drivers/mtd/tests/pagetest.c b/drivers/mtd/tests/pagetest.c
index ff1e0565b020..bc303cac9f43 100644
--- a/drivers/mtd/tests/pagetest.c
+++ b/drivers/mtd/tests/pagetest.c
@@ -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)
--
2.16.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] mtd: tests: check erase block count in page test
2018-02-26 21:27 [PATCH] mtd: tests: check erase block count in page test Stefan Agner
@ 2018-02-27 21:03 ` Boris Brezillon
0 siblings, 0 replies; 2+ messages in thread
From: Boris Brezillon @ 2018-02-27 21:03 UTC (permalink / raw)
To: Stefan Agner
Cc: dwmw2, computersforpeace, boris.brezillon, marek.vasut, richard,
cyrille.pitchen, linux-mtd
On Mon, 26 Feb 2018 22:27:03 +0100
Stefan Agner <stefan@agner.ch> wrote:
> When there is only a single erase block, the cross talk test
Not sure cross talk is the appropriate term here. Why not cross erase
test?
> does not report sensible errors. Warn in case there is only
> a single erase block instead of executing the test.
I guess the equivalent userspace test [1], suffer from the same
problem. Could you fix it too?
Also, I encourage everyone to use the userspace tests, since kernel ones
will be removed at some point.
[1]http://git.infradead.org/mtd-utils.git/blob/refs/heads/master:/tests/mtd-tests/nandpagetest.c
>
> Signed-off-by: Stefan Agner <stefan@agner.ch>
> ---
> drivers/mtd/tests/pagetest.c | 10 +++++++---
> 1 file changed, 7 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/mtd/tests/pagetest.c b/drivers/mtd/tests/pagetest.c
> index ff1e0565b020..bc303cac9f43 100644
> --- a/drivers/mtd/tests/pagetest.c
> +++ b/drivers/mtd/tests/pagetest.c
> @@ -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)
--
Boris Brezillon, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
https://bootlin.com
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-02-27 21:03 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-02-26 21:27 [PATCH] mtd: tests: check erase block count in page test Stefan Agner
2018-02-27 21:03 ` Boris Brezillon
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox