X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=test%2Fpy%2Ftests%2Ftest_efi_loader.py;h=adf9d7745299d2c5932d452acd91b93fccecbdb7;hb=4af2a33ee5b91223f993af9bb0de1a081090634b;hp=4d391e13efb90dd0c1250f2f3ec225dde455f5db;hpb=83dee949cb0ad33f36001f39e8aed31ed30e151b;p=oweals%2Fu-boot.git diff --git a/test/py/tests/test_efi_loader.py b/test/py/tests/test_efi_loader.py index 4d391e13ef..adf9d77452 100644 --- a/test/py/tests/test_efi_loader.py +++ b/test/py/tests/test_efi_loader.py @@ -1,9 +1,8 @@ +# SPDX-License-Identifier: GPL-2.0 # Copyright (c) 2016, NVIDIA CORPORATION. All rights reserved. # Copyright (c) 2016, Alexander Graf # # based on test_net.py. -# -# SPDX-License-Identifier: GPL-2.0 # Test efi loader implementation @@ -36,17 +35,18 @@ env__net_dhcp_server = True # static IP. If solely relying on DHCP, this variable may be omitted or set to # an empty list. env__net_static_env_vars = [ - ("ipaddr", "10.0.0.100"), - ("netmask", "255.255.255.0"), - ("serverip", "10.0.0.1"), + ('ipaddr', '10.0.0.100'), + ('netmask', '255.255.255.0'), + ('serverip', '10.0.0.1'), ] # Details regarding a file that may be read from a TFTP server. This variable # may be omitted or set to None if TFTP testing is not possible or desired. env__efi_loader_helloworld_file = { - "fn": "lib/efi_loader/helloworld.efi", - "size": 5058624, - "crc32": "c2244b26", + 'fn': 'lib/efi_loader/helloworld.efi', # file name + 'size': 5058624, # file length in bytes + 'crc32': 'c2244b26', # CRC32 check sum + 'addr': 0x40400000, # load address } """ @@ -119,7 +119,7 @@ def fetch_tftp_file(u_boot_console, env_conf): addr = f.get('addr', None) if not addr: - addr = u_boot_utils.find_ram_base(u_boot_console) + (1024 * 1024 * 4) + addr = u_boot_utils.find_ram_base(u_boot_console) fn = f['fn'] output = u_boot_console.run_command('tftpboot %x %s' % (addr, fn)) @@ -154,6 +154,8 @@ def test_efi_helloworld_net(u_boot_console): output = u_boot_console.run_command('bootefi %x' % addr) expected_text = 'Hello, world' assert expected_text in output + expected_text = '## Application terminated, r = 0' + assert expected_text in output @pytest.mark.buildconfigspec('cmd_bootefi_hello') def test_efi_helloworld_builtin(u_boot_console):