diff options
author | Simon Glass <sjg@chromium.org> | 2025-02-09 09:07:14 -0700 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2025-03-15 10:38:38 +0000 |
commit | 752c3769874596d012cd8325099d2ae20123f989 (patch) | |
tree | b50b3025ff2d124a96793b64d83b8a7d1cb2326c /test/py/tests/test_md.py | |
parent | 00dfb7038ea4dfe9d9667143bfecd11c05cab6fa (diff) |
test/py: Shorten u_boot_console
This fixture name is quite long and results in lots of verbose code.
We know this is U-Boot so the 'u_boot_' part is not necessary.
But it is also a bit of a misnomer, since it provides access to all the
information available to tests. It is not just the console.
It would be too confusing to use con as it would be confused with
config and it is probably too short.
So shorten it to 'ubman'.
Signed-off-by: Simon Glass <sjg@chromium.org>
Link: https://lore.kernel.org/u-boot/CAFLszTgPa4aT_J9h9pqeTtLCVn4x2JvLWRcWRD8NaN3uoSAtyA@mail.gmail.com/
Diffstat (limited to 'test/py/tests/test_md.py')
-rw-r--r-- | test/py/tests/test_md.py | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/test/py/tests/test_md.py b/test/py/tests/test_md.py index 83e3c546f4a..69e12eb625f 100644 --- a/test/py/tests/test_md.py +++ b/test/py/tests/test_md.py @@ -6,31 +6,31 @@ import pytest import u_boot_utils @pytest.mark.buildconfigspec('cmd_memory') -def test_md(u_boot_console): +def test_md(ubman): """Test that md reads memory as expected, and that memory can be modified using the mw command.""" - ram_base = u_boot_utils.find_ram_base(u_boot_console) + ram_base = u_boot_utils.find_ram_base(ubman) addr = '%08x' % ram_base val = 'a5f09876' expected_response = addr + ': ' + val - u_boot_console.run_command('mw ' + addr + ' 0 10') - response = u_boot_console.run_command('md ' + addr + ' 10') + ubman.run_command('mw ' + addr + ' 0 10') + response = ubman.run_command('md ' + addr + ' 10') assert(not (expected_response in response)) - u_boot_console.run_command('mw ' + addr + ' ' + val) - response = u_boot_console.run_command('md ' + addr + ' 10') + ubman.run_command('mw ' + addr + ' ' + val) + response = ubman.run_command('md ' + addr + ' 10') assert(expected_response in response) @pytest.mark.buildconfigspec('cmd_memory') -def test_md_repeat(u_boot_console): +def test_md_repeat(ubman): """Test command repeat (via executing an empty command) operates correctly for "md"; the command must repeat and dump an incrementing address.""" - ram_base = u_boot_utils.find_ram_base(u_boot_console) + ram_base = u_boot_utils.find_ram_base(ubman) addr_base = '%08x' % ram_base words = 0x10 addr_repeat = '%08x' % (ram_base + (words * 4)) - u_boot_console.run_command('md %s %x' % (addr_base, words)) - response = u_boot_console.run_command('') + ubman.run_command('md %s %x' % (addr_base, words)) + response = ubman.run_command('') expected_response = addr_repeat + ': ' assert(expected_response in response) |