From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stephen Warren Date: Fri, 18 Dec 2015 11:15:57 -0700 Subject: [U-Boot] [PATCH V2 4/7] test/py: test the md/mw commands In-Reply-To: <56740F72.2070308@monstr.eu> References: <1449094708-14784-1-git-send-email-swarren@wwwdotorg.org> <1449094708-14784-4-git-send-email-swarren@wwwdotorg.org> <56740F72.2070308@monstr.eu> Message-ID: <56744D5D.8040504@wwwdotorg.org> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On 12/18/2015 06:51 AM, Michal Simek wrote: > On 2.12.2015 23:18, Stephen Warren wrote: >> This tests whether md/mw work, and affect each-other. >> >> Command repeat is also tested. >> >> test/cmd_repeat.sh is removed, since the new Python-based test does >> diff --git a/test/py/test_md.py b/test/py/test_md.py >> + at pytest.mark.buildconfigspec("cmd_memory") >> +def test_md(uboot_console): >> + ram_base = uboot_console.find_ram_base() >> + addr = "%08x" % ram_base >> + val = "a5f09876" >> + expected_response = addr + ": " + val > > I would add this here. > uboot_console.run_command("mw " + addr + " 0 10") > > The reason is that with jtag I don't need to do board reset and DDR is > in the same state. Also I expect some board can have just cpu reset pin > and origin values can stay in memory. That's why clearing before test > will be good. Yes, that makes sense. Another alternative might be to read the current value, modify it e.g. invert it, and write it back. Still, your proposal is better since it'll yield the same command and result pattern each time, so I'll take that.