[PATCH mtd-utils] mtd: tests: check erase block count in page test
Boris Brezillon
boris.brezillon at bootlin.com
Sun Mar 18 14:23:44 PDT 2018
On Sat, 3 Mar 2018 23:39:46 +0100
Stefan Agner <stefan at agner.ch> wrote:
> 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.
Applied.
Thanks,
Boris
>
> Signed-off-by: Stefan Agner <stefan at 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;
--
Boris Brezillon, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
https://bootlin.com
More information about the linux-mtd
mailing list