1
0
Fork 0
mirror of https://github.com/u-boot/u-boot.git synced 2025-04-14 08:54:36 +00:00
u-boot/test/py
Andrew Goodbody 3c6a3e99b3 test/py: memtest: Fix test for non-trivial parameters
When using non-trivial values for parameters for this test it
will cause a spurious failure as the test passes a decimal value
to the mtest command which will interpret it as hexadecimal and
result in failure as below.

test/py/tests/test_memtest.py:66: in test_memtest_ddr
    assert expected_response in response
E   AssertionError: assert 'Tested 16 iteration(s) with 0 errors.' in 'Refusing to do empty test\r\nmtest - simple RAM read/write test\r\n\r\nUsage:\r\nmtest [start [end [pattern [iterations]]]]'
----------------------------- Captured stdout call -----------------------------
U-Boot> mtest 134217728 0x8001000 90 0x10
Refusing to do empty test
mtest - simple RAM read/write test
Usage:
mtest [start [end [pattern [iterations]]]]

The fix is to ensure that all the parameters to the mtest command are
passed as hexadecimal values.

Fixes: 22efc1cf27 ("test/py: memtest: Add tests for mtest command")
Signed-off-by: Andrew Goodbody <andrew.goodbody@linaro.org>
Reviewed-by: Love Kumar <love.kumar@amd.com>
2025-04-10 11:57:59 -06:00
..
tests test/py: memtest: Fix test for non-trivial parameters 2025-04-10 11:57:59 -06:00
.gitignore
conftest.py test/py: Allow tests to be filtered by role 2025-04-03 11:41:55 -06:00
console_base.py test/py: Add a helper to send characters 2025-04-03 11:41:55 -06:00
console_board.py test/py: Drop u_boot_ prefix on test files 2025-03-15 11:02:04 +00:00
console_sandbox.py test/py: Drop u_boot_ prefix on test files 2025-03-15 11:02:04 +00:00
multiplexed_log.css SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
multiplexed_log.py test: Add a way to set the environment for a pytest 2023-02-14 09:43:27 -07:00
pytest.ini test/py: Allow tests to be filtered by role 2025-04-03 11:41:55 -06:00
requirements.txt test_fs: Add exfat tests 2025-04-02 20:00:59 -06:00
spawn.py test/py: Drop u_boot_ prefix on test files 2025-03-15 11:02:04 +00:00
test.py test: remove unused import from pkg_resources 2024-04-12 08:53:31 -06:00
utils.py test/py: Drop u_boot_ prefix on test files 2025-03-15 11:02:04 +00:00