]> git.kernelconcepts.de Git - karo-tx-uboot.git/commit
mem_mtest: fix error reporting, allow escape with ^C
authorPaul Gortmaker <paul.gortmaker@windriver.com>
Fri, 2 Oct 2009 22:18:33 +0000 (18:18 -0400)
committerWolfgang Denk <wd@denx.de>
Sun, 18 Oct 2009 20:57:06 +0000 (22:57 +0200)
commit87b22b7787f397fc3daad570d711e478b1a7d253
tree9145d7f56e46706308a92339ef614eb46f4c85a1
parent9f4a420663419dc13f08a0ce65b93033c6172c69
mem_mtest: fix error reporting, allow escape with ^C

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.

Adding a check for ^C after any error is printed will give
the end user an escape mechanism from a console flood without
slowing down the overall test speed on a slow processor.

Also, the more extensive memtest quit after just a single error,
which is inconsistent with the normal memtest, and not useful if
if you are doing dynamic environmental impact testing, such as
heating/cooling etc.

Both tests now track the error count and report it properly
at test completion.

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Acked-by: Mike Frysinger <vapier@gentoo.org>
common/cmd_mem.c