From: Alexander Graf <agraf@suse.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v2] travis: Add efi_loader grub2 test
Date: Tue, 22 Nov 2016 00:21:06 +0100 [thread overview]
Message-ID: <69da4cbb-4999-74ef-f5ed-c2aed45bd3ad@suse.de> (raw)
In-Reply-To: <3632a05a-0759-84e9-d7fa-6da8d3e69994@wwwdotorg.org>
On 21/11/2016 23:21, Stephen Warren wrote:
> On 11/18/2016 05:18 AM, Alexander Graf wrote:
>> We have all the building blocks now to run arbitrary efi applications
>> in travis. The most important one out there is grub2, so let's add
>> a simple test to verify that grub2 still comes up.
>
>> diff --git a/.travis.yml b/.travis.yml
>
>> @@ -45,6 +48,9 @@ install:
>> - virtualenv /tmp/venv
>> - . /tmp/venv/bin/activate
>> - pip install pytest
>> + - grub-mkimage -o ~/grub_x86.efi -O i386-efi normal echo lsefimmap
>> lsefi lsefisystab efinet tftp minicmd
>> + - mkdir ~/grub2-arm
>> + - ( cd ~/grub2-arm; wget -O -
>> http://download.opensuse.org/ports/armv7hl/distribution/leap/42.2/repo/oss/suse/armv7hl/grub2-arm-efi-2.02~beta2-87.1.armv7hl.rpm
>> | rpm2cpio | cpio -di )
>
> Do we really want to do this for all the build-only jobs too? I might
> have expected to do this inside the test scripts that actually use those
> binaries.
>
>> diff --git a/test/py/tests/test_efi_loader.py
>> b/test/py/tests/test_efi_loader.py
>
>> + at pytest.mark.buildconfigspec('cmd_bootefi')
>
>> + u_boot_console.run_command('bootefi %x' % addr,
>> wait_for_prompt=False)
>> +
>> + # Verify that we have an SMBIOS table
>> + check_smbios =
>> u_boot_console.config.env.get('env__efi_loader_check_smbios', False)
>> + if check_smbios:
>> + u_boot_console.wait_for('grub>')
>> + output = u_boot_console.run_command('lsefisystab',
>> wait_for_prompt=False, wait_for_echo=False)
>> + u_boot_console.wait_for('SMBIOS')
>> +
>> + # Then exit cleanly
>> + u_boot_console.wait_for('grub>')
>> + output = u_boot_console.run_command('exit',
>> wait_for_prompt=False, wait_for_echo=False)
>> + u_boot_console.wait_for('r = 0')
>> +
>> + # And give us our U-Boot prompt back
>> + u_boot_console.run_command('')
>
> I can't help wondering if adding push_prompt() function (for use in a
> Python "with" statement) to u_boot_console wouldn't be better; that
> would avoid all the wait_for_prompt=False and wait_for(prompt) logic there.
What would that function do? The same?
JFYI, I've added the html log output for the sequence above at the end
of the email.
Alex
tftpboot 80400000 grub_arm.efi
smc911x: MAC 52:54:00:12:34:56
smc911x: detected LAN9118 controller
smc911x: phy initialized
smc911x: MAC 52:54:00:12:34:56
Using smc911x-0 device
TFTP from server 10.0.2.2; our IP address is 10.0.2.15
Filename 'grub_arm.efi'.
Load address: 0x80400000
Loading:
*%08#################################################################
#################################################################
##############
14.3 MiB/s
done
Bytes transferred = 732672 (b2e00 hex)
smc911x: MAC 52:54:00:12:34:56
=> crc32 80400000 $filesize
CRC32 for 80400000 ... 804b2dff ==> 4afa7ec6
=> bootefi 80400000
## Starting EFI application at 80400000 ...
WARNING: Invalid device tree, expect boot to fail
Scanning disks on mmc...
Card did not respond to voltage select!
MMC Device 1 not found
MMC Device 2 not found
MMC Device 3 not found
Found 0 disks
%1b[?25hWelcome to GRUB!
smc911x: detected LAN9118 controller
smc911x: phy initialized
smc911x: MAC 52:54:00:12:34:56
smc911x: detected LAN9118 controller
smc911x: phy initialized
smc911x: MAC 52:54:00:12:34:56
%1b[2J%1b[18t%1b[1;26fGNU GRUB version 2.02~beta2
%1b[?25h Minimal BASH-like line editing is supported. For the first
word, TAB
lists possible command completions. Anywhere else TAB lists possible
device or file completions.
grub>
%1b[9;6fe%1b[9;7f%1b[9;7fx%1b[9;8f%1b[9;8fi%1b[9;9f%1b[9;9ft%1b[9;10f
## Application terminated, r = 0
next prev parent reply other threads:[~2016-11-21 23:21 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-18 12:18 [U-Boot] [PATCH v2] travis: Add efi_loader grub2 test Alexander Graf
2016-11-21 22:21 ` Stephen Warren
2016-11-21 22:31 ` Tom Rini
2016-11-21 23:15 ` Alexander Graf
2016-11-30 4:27 ` Stephen Warren
2016-11-21 23:21 ` Alexander Graf [this message]
2016-11-30 4:28 ` Stephen Warren
2016-11-27 14:56 ` [U-Boot] [U-Boot,v2] " Tom Rini
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=69da4cbb-4999-74ef-f5ed-c2aed45bd3ad@suse.de \
--to=agraf@suse.de \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.