public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
From: Boris Brezillon <boris.brezillon@bootlin.com>
To: Stefan Agner <stefan@agner.ch>
Cc: dwmw2@infradead.org, computersforpeace@gmail.com,
	boris.brezillon@free-electrons.com, marek.vasut@gmail.com,
	richard@nod.at, cyrille.pitchen@wedev4u.fr,
	linux-mtd@lists.infradead.org
Subject: Re: [PATCH] mtd: tests: check erase block count in page test
Date: Tue, 27 Feb 2018 22:03:28 +0100	[thread overview]
Message-ID: <20180227220328.546750db@bbrezillon> (raw)
In-Reply-To: <20180226212703.1662-1-stefan@agner.ch>

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

      reply	other threads:[~2018-02-27 21:03 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180227220328.546750db@bbrezillon \
    --to=boris.brezillon@bootlin.com \
    --cc=boris.brezillon@free-electrons.com \
    --cc=computersforpeace@gmail.com \
    --cc=cyrille.pitchen@wedev4u.fr \
    --cc=dwmw2@infradead.org \
    --cc=linux-mtd@lists.infradead.org \
    --cc=marek.vasut@gmail.com \
    --cc=richard@nod.at \
    --cc=stefan@agner.ch \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox