[U-Boot] [RFC] efi_loader: Add test to boot OpenBSD's efi bootloader
agraf at suse.de
Fri Aug 11 09:46:08 UTC 2017
On 06.08.17 17:10, Rob Clark wrote:
> Signed-off-by: Rob Clark <robdclark at gmail.com>
> Kinda works, but since we don't have an 'exit' command like grub, we
> have to reboot, which leaves the "board" in a bad state (I guess,
> since the next test fails). I haven't tackled the travis bits to get
> travis to download OpenBSD's bootloader, or other little details like
I think it's a very good addition to the tests - we should definitely
try and test the OpenBSD bootloader as well.
Adding the travis bits to download it should be a matter of wget'ing it
into the right directory.
As for the reboot - I think you only have to get yourself back to a boot
prompt and check for that. That's basically what ensure_spawned() does too.
> So suggestions welcome ;-)
> test/py/tests/test_efi_loader.py | 19 +++++++++++++++++++
> 1 file changed, 19 insertions(+)
> diff --git a/test/py/tests/test_efi_loader.py b/test/py/tests/test_efi_loader.py
> index 5d7f5dbfb2..376f6442a3 100644
> --- a/test/py/tests/test_efi_loader.py
> +++ b/test/py/tests/test_efi_loader.py
> @@ -193,3 +193,22 @@ def test_efi_grub_net(u_boot_console):
> # And give us our U-Boot prompt back
> + at pytest.mark.buildconfigspec('cmd_bootefi')
> +def test_efi_openbsd_net(u_boot_console):
> + """Run OpenBSD's bootloader via TFTP.
> + The bootaa64.efi file is downloaded from the TFTP server and
> + gets executed.
> + """
> + addr = fetch_tftp_file(u_boot_console, 'env__efi_loader_openbsd_file')
> + u_boot_console.run_command('bootefi %x' % addr, wait_for_prompt=False)
> + # Check that bootloader loads properly:
> + u_boot_console.wait_for('boot>')
> + # There is no exit, but there is a reboot cmd.. maybe we need to do
> + # more than this to get u-boot running again??
> + u_boot_console.run_command('reboot', wait_for_prompt=False, wait_for_echo=False)
More information about the U-Boot