* [PATCH] mtd: tests: abort torturetest on erase errors
@ 2014-11-21 18:24 Brian Norris
[not found] ` <0D23F1ECC880A74392D56535BCADD7351C2DE56B@NTXBOIMBX03.micron.com>
2014-12-13 3:29 ` Brian Norris
0 siblings, 2 replies; 3+ messages in thread
From: Brian Norris @ 2014-11-21 18:24 UTC (permalink / raw)
To: linux-mtd; +Cc: Brian Norris, Akinobu Mita
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>
Cc: <stable@vger.kernel.org>
---
drivers/mtd/tests/torturetest.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/mtd/tests/torturetest.c b/drivers/mtd/tests/torturetest.c
index eeab96973cf0..b55bc52a1340 100644
--- a/drivers/mtd/tests/torturetest.c
+++ b/drivers/mtd/tests/torturetest.c
@@ -264,7 +264,9 @@ static int __init tort_init(void)
int i;
void *patt;
- mtdtest_erase_good_eraseblocks(mtd, bad_ebs, eb, ebcnt);
+ err = mtdtest_erase_good_eraseblocks(mtd, bad_ebs, eb, ebcnt);
+ if (err)
+ goto out;
/* Check if the eraseblocks contain only 0xFF bytes */
if (check) {
--
1.9.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] mtd: tests: abort torturetest on erase errors
[not found] ` <0D23F1ECC880A74392D56535BCADD7351C2DE56B@NTXBOIMBX03.micron.com>
@ 2014-11-21 19:20 ` Brian Norris
0 siblings, 0 replies; 3+ messages in thread
From: Brian Norris @ 2014-11-21 19:20 UTC (permalink / raw)
To: Jeff Lauruhn (jlauruhn); +Cc: linux-mtd
+ linux-mtd
On Fri, Nov 21, 2014 at 06:55:54PM +0000, Jeff Lauruhn (jlauruhn) wrote:
> Brian;
> What is the purpose of the torture test?
Please, no personal questions like this. Ask publicly so others can
learn.
And please read the code, comments, and existing documentation first.
e.g.:
http://www.linux-mtd.infradead.org/doc/general.html#L_mtd_tests
Brian
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] mtd: tests: abort torturetest on erase errors
2014-11-21 18:24 [PATCH] mtd: tests: abort torturetest on erase errors Brian Norris
[not found] ` <0D23F1ECC880A74392D56535BCADD7351C2DE56B@NTXBOIMBX03.micron.com>
@ 2014-12-13 3:29 ` Brian Norris
1 sibling, 0 replies; 3+ messages in thread
From: Brian Norris @ 2014-12-13 3:29 UTC (permalink / raw)
To: linux-mtd; +Cc: Akinobu Mita
On Fri, Nov 21, 2014 at 10:24:29AM -0800, Brian Norris wrote:
> 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>
> Cc: <stable@vger.kernel.org>
Applied to l2-mtd.git.
Brian
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-12-13 3:29 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-11-21 18:24 [PATCH] mtd: tests: abort torturetest on erase errors Brian Norris
[not found] ` <0D23F1ECC880A74392D56535BCADD7351C2DE56B@NTXBOIMBX03.micron.com>
2014-11-21 19:20 ` Brian Norris
2014-12-13 3:29 ` Brian Norris
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).