public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Rob Clark <robdclark@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [RFC] efi_loader: Add test to boot OpenBSD's efi bootloader
Date: Sun,  6 Aug 2017 12:10:28 -0400	[thread overview]
Message-ID: <20170806161033.21144-1-robdclark@gmail.com> (raw)

Signed-off-by: Rob Clark <robdclark@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
that.

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
     u_boot_console.run_command('')
+
+ 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)
-- 
2.13.0

             reply	other threads:[~2017-08-06 16:10 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-06 16:10 Rob Clark [this message]
2017-08-06 18:54 ` [U-Boot] [RFC] efi_loader: Add test to boot OpenBSD's efi bootloader Mark Kettenis
2017-08-06 19:06   ` Rob Clark
2017-08-10  3:43     ` Jonathan Gray
2017-08-10 10:41       ` Rob Clark
2017-08-07 16:25 ` Stephen Warren
2017-08-11  9:46 ` Alexander Graf

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170806161033.21144-1-robdclark@gmail.com \
    --to=robdclark@gmail.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox