diff options
author | Tom Rini <trini@konsulko.com> | 2025-05-11 08:36:37 -0600 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2025-05-11 08:36:37 -0600 |
commit | fa51a4d57d910df4f3beffa5d3e1d61a1d5d824b (patch) | |
tree | 02a816537f5f381c7a43ca342f9f02872d04592e /test/py/tests/test_efi_loader.py | |
parent | feb55165233623648cb0a74953735b00ec6e322e (diff) | |
parent | 8fdb8740b39b01d182137d437f2d1d16b526a4b5 (diff) |
Merge tag 'efi-2025-07-rc3' of https://source.denx.de/u-boot/custodians/u-boot-efi
Pull-request efi-2025-07-rc3
CI:
* https://source.denx.de/u-boot/custodians/u-boot-efi/-/pipelines/26146
Documentation:
* Improve the pytest documentation
* u-boot-test-reset: mention power cycling
* describe u-boot-test-release
* correct link to QEMU
* describe that RISC-V supports semihosting
UEFI:
* link libggc via PLATFORM_LIBGCC to EFI binaries
* allow suppressing ANSI output in dtbdump.efi
* test/py/test_efi_fit: test fdt and initrd
# -----BEGIN PGP SIGNATURE-----
#
# iQIzBAABCAAdFiEEK7wKXt3/btL6/yA+hO4vgnE3U0sFAmggj+IACgkQhO4vgnE3
# U0sjTBAAkWySSBNFoj12AyjO2h4kJecxiJJxyoMYTcsr3xdgV0WTPQFaWcSBqTsL
# NgKq5KFNe+ywUdDIqU1VLOTcQf298hofRrcp5Gfhv+syZaRCorCSoSJI6ZveZ5Bi
# 9N2pPvhEVrlFBF2XannJ5ilYtLAbiqIvVFmdLmFwRPbODv/gfEkSudSy0Za7t1tM
# c7RoRegpXziY4Y1XPfr3MpXgKpUQkOPnvXKUwtHhL055X/1Ggg87dzPg1fiU+DiQ
# AGAgvGD/KF/ym4aWQ3jWyji8Kxc5BLsurv083it7JAmL82wqNbU9j5cx3mS/f2Le
# uL7YWv1GANbq+MoBC5O3nkB+yUtHSLylFC3KKFiehmKhc/JO+Uj3cJY/Q/25+lxs
# aahG3C/5xgBTgM6YEqJfSqKYQVFsC2V/a7gWAFlX7OidYXm6oDBu4TeAHmAtBgcj
# pz0AVCYMWyhKE+zb+4U2mlKEQ8bJpFdC2Q+pTMciGAM3YyztotJ1yoM4IndDrh4q
# ScrIpXHSqWLlZfev+NnJDw1UKLWEJIMeXh0uzfpaT5M0cLEDeHTOSX9Fp3ZPj9Af
# +T3nNWSXWlOW0wc6C5igj4p0UiGSbHMMPOa54f/D0gdl/UkPZ1YPBYVBa/eX1yBy
# NlaJziLCmLqyWpYIVhaigKDtGWfgjoHGaABfyuSIj/HxmIHhD5w=
# =NbGi
# -----END PGP SIGNATURE-----
# gpg: Signature made Sun 11 May 2025 05:54:10 AM CST
# gpg: using RSA key 2BBC0A5EDDFF6ED2FAFF203E84EE2F827137534B
# gpg: Can't check signature: No public key
Diffstat (limited to 'test/py/tests/test_efi_loader.py')
-rw-r--r-- | test/py/tests/test_efi_loader.py | 87 |
1 files changed, 46 insertions, 41 deletions
diff --git a/test/py/tests/test_efi_loader.py b/test/py/tests/test_efi_loader.py index 58f2655191f..91f151d09cd 100644 --- a/test/py/tests/test_efi_loader.py +++ b/test/py/tests/test_efi_loader.py @@ -13,43 +13,45 @@ that rely on network will be automatically skipped. For example: -# Boolean indicating whether the Ethernet device is attached to USB, and hence -# USB enumeration needs to be performed prior to network tests. -# This variable may be omitted if its value is False. -env__net_uses_usb = False - -# Boolean indicating whether the Ethernet device is attached to PCI, and hence -# PCI enumeration needs to be performed prior to network tests. -# This variable may be omitted if its value is False. -env__net_uses_pci = True - -# True if a DHCP server is attached to the network, and should be tested. -# If DHCP testing is not possible or desired, this variable may be omitted or -# set to False. -env__net_dhcp_server = True - -# A list of environment variables that should be set in order to configure a -# 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'), -] - -# 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', # file name - 'size': 5058624, # file length in bytes - 'crc32': 'c2244b26', # CRC32 check sum - 'addr': 0x40400000, # load address -} - -# False if the helloworld EFI over HTTP boot test should be performed. -# If HTTP boot testing is not possible or desired, set this variable to True or -# ommit it. -env__efi_helloworld_net_http_test_skip = True +.. code-block:: python + + # Boolean indicating whether the Ethernet device is attached to USB, and hence + # USB enumeration needs to be performed prior to network tests. + # This variable may be omitted if its value is False. + env__net_uses_usb = False + + # Boolean indicating whether the Ethernet device is attached to PCI, and hence + # PCI enumeration needs to be performed prior to network tests. + # This variable may be omitted if its value is False. + env__net_uses_pci = True + + # True if a DHCP server is attached to the network, and should be tested. + # If DHCP testing is not possible or desired, this variable may be omitted or + # set to False. + env__net_dhcp_server = True + + # A list of environment variables that should be set in order to configure a + # 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'), + ] + + # 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', # file name + 'size': 5058624, # file length in bytes + 'crc32': 'c2244b26', # CRC32 check sum + 'addr': 0x40400000, # load address + } + + # False if the helloworld EFI over HTTP boot test should be performed. + # If HTTP boot testing is not possible or desired, set this variable to True or + # ommit it. + env__efi_helloworld_net_http_test_skip = True """ import pytest @@ -161,6 +163,11 @@ def fetch_file(ubman, env_conf, proto): return addr def do_test_efi_helloworld_net(ubman, proto): + """Download and execute the helloworld appliation + + The helloworld.efi file is downloaded based on the value passed to us as a + protocol and is executed using the fallback device tree at $fdtcontroladdr. + """ addr = fetch_file(ubman, 'env__efi_loader_helloworld_file', proto) output = ubman.run_command('bootefi %x' % addr) @@ -175,8 +182,7 @@ def do_test_efi_helloworld_net(ubman, proto): def test_efi_helloworld_net_tftp(ubman): """Run the helloworld.efi binary via TFTP. - The helloworld.efi file is downloaded from the TFTP server and is executed - using the fallback device tree at $fdtcontroladdr. + Call the do_test_efi_helloworld_net function to execute the test via TFTP. """ do_test_efi_helloworld_net(ubman, PROTO_TFTP); @@ -187,8 +193,7 @@ def test_efi_helloworld_net_tftp(ubman): def test_efi_helloworld_net_http(ubman): """Run the helloworld.efi binary via HTTP. - The helloworld.efi file is downloaded from the HTTP server and is executed - using the fallback device tree at $fdtcontroladdr. + Call the do_test_efi_helloworld_net function to execute the test via HTTP. """ if ubman.config.env.get('env__efi_helloworld_net_http_test_skip', True): pytest.skip('helloworld.efi HTTP test is not enabled!') |