Files
u-boot/test/py/tests/test_memtest.py
Michal Simek 06150645b1 Revert "pytest: Mark memtest_ddr as xfail"
This reverts commit dfb16ce1b2.

The previous patch
"arm64: zynqmp: Changed scratch address used by the alternate memory
test" is fixing this test failure.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2018-02-21 10:06:26 +01:00

27 lines
932 B
Python

# Copyright (c) 2017 Xilinx, Inc. Michal Simek
#
# SPDX-License-Identifier: GPL-2.0
import pytest
pytestmark = pytest.mark.buildconfigspec('cmd_memtest')
def test_memtest_failed(u_boot_console):
"""Failed testcase where end address is smaller than starting address"""
expected_response = 'Refusing to do empty test'
response = u_boot_console.run_command('mtest 20 10 0 2')
assert(expected_response in response)
def test_memtest_ddr(u_boot_console):
"""Test that md reads memory as expected, and that memory can be modified
using the mw command."""
start = 0
addr = '%08x' % start
size = 10000
end = '%08x' % size
interactions = 16
int_hex = '%08x' % interactions
expected_response = 'Tested ' + str(interactions) + ' iteration(s) with 0 errors.'
response = u_boot_console.run_command('mtest ' + addr + ' ' + end +' 0 ' + int_hex)
assert(expected_response in response)