From: Paul Gortmaker <paul.gortmaker@windriver.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] mem_mtest: bail out after finding 1st memory error.
Date: Wed, 30 Sep 2009 16:53:20 -0400 [thread overview]
Message-ID: <4AC3C540.9050004@windriver.com> (raw)
In-Reply-To: <20090930202343.244A1832E408@gemini.denx.de>
Wolfgang Denk wrote:
> Dear Paul Gortmaker,
>
> In message <1254338488-15332-1-git-send-email-paul.gortmaker@windriver.com> you wrote:
>> The basic memtest function tries to watch for ^C after each
>> pattern pass as an escape mechanism, but if things are horribly
>> wrong, we'll be stuck in an inner loop flooding the console with
>> error messages and never check for ^C. To make matters worse,
>> if the user waits for all the error messages to complete, we
>> then incorrectly report the test passed without errors.
>>
>> By inspecting the code, it is clear that the test was originally
>> written with returning after the 1st error in mind (which is what
>> the optional more extensive test does). Making it do this also
>> solves the endless console flood problem if a person tests really
>> bad RAM.
>
> Please don't change the behaviour, rather fix the problems with it.
>
> If you like, please feel free to add code to bail out after a number
> of errors, but that should be optional (for example using an
> additional argument on the command line).
I agree in principle, and I'd actually 1st created a patch
that watched for ^C in the inner loop. But the more I looked
at the code, the more I felt that the original intention of
the code was in fact the "new" behaviour.
For example, the CONFIG_SYS_ALT_MEMTEST contains:
printf ("\nFAILURE: ....);
return 1;
in several places throughout the test. And in the
default test, the code has:
if (iteration_limit && iterations > iteration_limit) {
printf("Tested %d iteration(s) without errors.\n",
iterations-1);
return 0;
}
i.e. there was never any provision for checking the rcode
variable or counting the errors -- it assumed that if it
ran the full iteration count, then there were no errors.
If you still think it is best to maintain current behaviour
and not stop after the 1st error, that is fine, I can do that,
but I just wanted to be sure it was clear why I did it this
way.
Thanks,
Paul.
>
>
> Best regards,
>
> Wolfgang Denk
>
next prev parent reply other threads:[~2009-09-30 20:53 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-09-30 19:21 [U-Boot] [PATCH] mem_mtest: bail out after finding 1st memory error Paul Gortmaker
2009-09-30 20:23 ` Wolfgang Denk
2009-09-30 20:53 ` Paul Gortmaker [this message]
2009-09-30 21:46 ` Wolfgang Denk
2009-10-01 14:00 ` Paul Gortmaker
2009-10-01 18:33 ` Wolfgang Denk
2009-10-01 23:52 ` [U-Boot] [PATCH] mem_mtest: fix error reporting, allow escape with ^C Paul Gortmaker
2009-10-01 23:57 ` Mike Frysinger
2009-10-02 0:04 ` Paul Gortmaker
2009-10-02 22:18 ` Paul Gortmaker
2009-10-03 6:19 ` Mike Frysinger
2009-10-18 20:57 ` Wolfgang Denk
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=4AC3C540.9050004@windriver.com \
--to=paul.gortmaker@windriver.com \
--cc=u-boot@lists.denx.de \
/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