[RFC] memtest

Simon Glass sjg at chromium.org
Sat Mar 29 00:47:51 CET 2025


Hi Andrew,

On Mon, 17 Mar 2025 at 16:16, Andrew Goodbody
<andrew.goodbody at linaro.org> wrote:
>
> As far as I can tell no one makes any use of
> test/py/tests/test_memtest.py. At least there is no entry in
> u-boot-hooks that will enable its use.
>
> This is not surprising as the code does not actually work correctly. It
> will construct a command line for the 'mtest' command with some decimal
> parameters and some in hex. 'mtest' will interpret all parameters as hex
> and this makes the test fail for almost anything apart from the trivial
> cases where the affected parameters are 0.

Oh dear!

>
> I looked into this for a while before I found the documentation that
> describes memory testing which states that 'mtest' is deprecated.

There is a mem_test_alt() which seems to work quite well.

>
> So my question is should I submit a patch to fix the test even though
> the command itself is deprecated? Should I then enable its use in CI?
> Alternatively should I submit a patch to remove the test as it is not
> used and is broken?

I think you should create a C test in test/cmd and make it do a memory
test e.g. at the start of memory.

>
> If the test should be removed a follow up question would be should the
> command itself be removed as well? This will be harder to do as it seems
> that some boards are using the config default values in their board code.

I think a bootloader should have a useful memory tester.

Regards,
Simon


More information about the U-Boot mailing list