diff options
author | Tom Rini <trini@konsulko.com> | 2025-04-07 16:40:02 -0600 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2025-04-08 11:43:23 -0600 |
commit | ff61d6bfd1c9534d3fc2397846a5899639f2e55d (patch) | |
tree | dcfe4bc52848a5637c975a3352b57885e5b8a06d /test/py/tests/test_memtest.py | |
parent | 34820924edbc4ec7803eb89d9852f4b870fa760a (diff) | |
parent | f892a7f397a66d8d09f418d1e0e06dfb48bac27d (diff) |
Merge branch 'next'
Note that this undoes the changes of commit cf6d4535cc4c ("x86:
emulation: Disable bloblist for now") as that was intended only for the
release due to time.
Diffstat (limited to 'test/py/tests/test_memtest.py')
-rw-r--r-- | test/py/tests/test_memtest.py | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/test/py/tests/test_memtest.py b/test/py/tests/test_memtest.py index 0618d96f1be..0340edbea5a 100644 --- a/test/py/tests/test_memtest.py +++ b/test/py/tests/test_memtest.py @@ -24,8 +24,8 @@ env__memtest = { } """ -def get_memtest_env(u_boot_console): - f = u_boot_console.config.env.get("env__memtest", None) +def get_memtest_env(ubman): + f = ubman.config.env.get("env__memtest", None) if not f: pytest.skip("memtest is not enabled!") else: @@ -38,31 +38,31 @@ def get_memtest_env(u_boot_console): return start, end, pattern, iteration, timeout @pytest.mark.buildconfigspec("cmd_memtest") -def test_memtest_negative(u_boot_console): +def test_memtest_negative(ubman): """Negative testcase where end address is smaller than starting address and pattern is invalid.""" - start, end, pattern, iteration, timeout = get_memtest_env(u_boot_console) + start, end, pattern, iteration, timeout = get_memtest_env(ubman) expected_response = "Refusing to do empty test" - response = u_boot_console.run_command( + response = ubman.run_command( f"mtest 2000 1000 {pattern} {hex(iteration)}" ) assert expected_response in response - output = u_boot_console.run_command("echo $?") + output = ubman.run_command("echo $?") assert not output.endswith("0") - u_boot_console.run_command(f"mtest {start} {end} 'xyz' {hex(iteration)}") - output = u_boot_console.run_command("echo $?") + ubman.run_command(f"mtest {start} {end} 'xyz' {hex(iteration)}") + output = ubman.run_command("echo $?") assert not output.endswith("0") @pytest.mark.buildconfigspec("cmd_memtest") -def test_memtest_ddr(u_boot_console): +def test_memtest_ddr(ubman): """Test that md reads memory as expected, and that memory can be modified using the mw command.""" - start, end, pattern, iteration, timeout = get_memtest_env(u_boot_console) + start, end, pattern, iteration, timeout = get_memtest_env(ubman) expected_response = f"Tested {str(iteration)} iteration(s) with 0 errors." - with u_boot_console.temporary_timeout(timeout): - response = u_boot_console.run_command( + with ubman.temporary_timeout(timeout): + response = ubman.run_command( f"mtest {start} {end} {pattern} {hex(iteration)}" ) assert expected_response in response - output = u_boot_console.run_command("echo $?") + output = ubman.run_command("echo $?") assert output.endswith("0") |