]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
mtd: tests: abort torturetest on erase errors
authorBrian Norris <computersforpeace@gmail.com>
Fri, 21 Nov 2014 18:24:29 +0000 (10:24 -0800)
committerJiri Slaby <jslaby@suse.cz>
Mon, 26 Jan 2015 13:39:04 +0000 (14:39 +0100)
commita3c563629b22bdf1fc61a294dcc345d341f41e9e
tree851b551df53dc6f0ad91834c0119315ec7959df6
parentf844de9aa69cd95c52636e5b4faeaf1353477252
mtd: tests: abort torturetest on erase errors

commit 68f29815034e9dc9ed53cad85946c32b07adc8cc upstream.

The torture test should quit once it actually induces an error in the
flash. This step was accidentally removed during refactoring.

Without this fix, the torturetest just continues infinitely, or until
the maximum cycle count is reached. e.g.:

   ...
   [ 7619.218171] mtd_test: error -5 while erasing EB 100
   [ 7619.297981] mtd_test: error -5 while erasing EB 100
   [ 7619.377953] mtd_test: error -5 while erasing EB 100
   [ 7619.457998] mtd_test: error -5 while erasing EB 100
   [ 7619.537990] mtd_test: error -5 while erasing EB 100
   ...

Fixes: 6cf78358c94f ("mtd: mtd_torturetest: use mtd_test helpers")
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Cc: Akinobu Mita <akinobu.mita@gmail.com>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
drivers/mtd/tests/torturetest.c