From: T Karthik Reddy Date: Tue, 12 Mar 2019 14:50:26 +0000 (+0530) Subject: test: py: tests: Add py-test case for zynq aes loadp command X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=506e730462e99050f0b298c789df119f6c62898b;p=thirdparty%2Fu-boot.git test: py: tests: Add py-test case for zynq aes loadp command This patch adds py-test case for zynq aes loadp command. It tests loading partial bitstream to DDR and tests loading partial bitstream to PL using "zynq aes loadp" command. This test needs to be executed only in bootmode, if not it wil be skipped. Signed-off-by: T Karthik Reddy Signed-off-by: Siva Durga Prasad Paladugu Signed-off-by: Michal Simek --- diff --git a/test/py/tests/test_zynq_aes.py b/test/py/tests/test_zynq_aes.py index 574d2a9ffda..48ffa23d22a 100644 --- a/test/py/tests/test_zynq_aes.py +++ b/test/py/tests/test_zynq_aes.py @@ -32,6 +32,7 @@ env__net_static_env_vars = [ env__zynq_aes_readable_file = { "fn": "zynq_aes_image.bin", "fnbit": "zynq_aes_bit.bin", + "fnpbit": "zynq_aes_par_bit.bin", "srcaddr": 0x1000000, "dstaddr": 0x2000000, "dstlen": "0x1000000", @@ -117,3 +118,33 @@ def test_zynq_aes_bitstream(u_boot_console): expected_zynqaes = 'zynq aes [operation type] ' output = u_boot_console.run_command('zynq aes load %x $filesize' % (srcaddr)) assert expected_zynqaes not in output + + +@pytest.mark.buildconfigspec('cmd_zynq_aes') +@pytest.mark.buildconfigspec('cmd_net') +@pytest.mark.buildconfigspec('cmd_dhcp') +@pytest.mark.buildconfigspec('net') +# Can be tested on board xhd-zc702-2 - efuse must be blown +@pytest.mark.xfail +def test_zynq_aes_partial_bitstream(u_boot_console): + + zynq_aes_pre_commands(u_boot_console) + test_net.test_net_dhcp(u_boot_console) + test_net.test_net_setup_static(u_boot_console) + + f = u_boot_console.config.env.get('env__zynq_aes_readable_file', None) + if not f: + pytest.skip('No TFTP readable file to read') + + srcaddr = f.get('srcaddr', None) + if not srcaddr: + addr = u_boot_utils.find_ram_base(u_boot_console) + + expected_tftp = 'Bytes transferred = ' + fn = f['fnpbit'] + output = u_boot_console.run_command('tftpboot %x %s' % (srcaddr, fn)) + assert expected_tftp in output + + expected_zynqaes = 'zynq aes [operation type] ' + output = u_boot_console.run_command('zynq aes loadp %x $filesize' % (srcaddr)) + assert expected_zynqaes not in output