From: Tom Rini <trini@konsulko.com>
To: Love Kumar <love.kumar@amd.com>
Cc: u-boot@lists.denx.de, michal.simek@amd.com, git@xilinx.com
Subject: Re: [PATCH v5] test/py: net_boot: Add test cases for net boot
Date: Tue, 28 May 2024 15:30:24 -0600 [thread overview]
Message-ID: <20240528213024.GA546015@oliver.lan> (raw)
In-Reply-To: <eedb4599e11ffed72cd0866fa02d4b144e3192ad.1716886448.git.love.kumar@amd.com>
[-- Attachment #1: Type: text/plain, Size: 3059 bytes --]
On Tue, May 28, 2024 at 02:33:17PM +0530, Love Kumar wrote:
> Add tests for booting image using tftpboot/pxe boot commands, tftpboot
> boot case loads the FIT image into DDR and boots using bootm command
> whereas pxe boot cases downloads the pxe configuration file from the
> TFTP server and interprets it to boot the images mentioned in the pxe
> configurations file.
> This test relies on boardenv_* containing configuration values including
> the parameter 'pattern'. tftpboot/pxe boot cases boots the Linux till the
> boot log pattern value is matched. For example, if the parameter
> 'pattern' is defined as 'login:', it will boot till login prompt.
Good news is that the kernel test is working for me now. Bad news is the
PXE test fails, but good news is I figure out the problem.
[snip]
> +def setup_tftpboot_boot(u_boot_console):
> + f = u_boot_console.config.env.get('env__net_tftp_bootable_file', None)
> + if not f:
> + pytest.skip('No TFTP bootable file to read')
> +
> + test_net.test_net_dhcp(u_boot_console)
> + if not test_net.net_set_up:
> + test_net.test_net_setup_static(u_boot_console)
This works for me, and matches how other tests are written. However:
[snip]
> +def setup_pxe_boot(u_boot_console):
> + f = u_boot_console.config.env.get('env__net_pxe_bootable_file', None)
> + if not f:
> + pytest.skip('No PXE bootable file to read')
> +
> + test_net.test_net_dhcp(u_boot_console)
> + test_net.test_net_setup_static(u_boot_console)
> + return f
This doesn't check for if dhcp worked and skips the test when DHCP works
but there's no static config, which is how my lab is. For v6 we should
have a setup_networking function that both the TFTP and PXE tests call
in to that does what I suggested above. And what I suggested above
would be a good clean-up to the xilinx-specific tests.
That said, with a local fixup so that my network is configured, and
having pxelinux.cfg/01-b8-27-eb-fc-64-a6 (the first file pxe boot looks
for on my test Pi), pxeboot.cfg/default and pxeboot.cfg/default-arm all
configured from the examples given in the test itself, I get:
------------------------------------ Captured stdout call -------------------------------------
U-Boot> setenv autoload no
U-Boot> U-Boot> dhcp
Waiting for Ethernet connection... done.
BOOTP broadcast 1
BOOTP broadcast 2
DHCP client bound to address 192.168.1.100 (255 ms)
U-Boot> U-Boot> pxe get
missing environment variable: pxeuuid
Retrieving file: pxelinux.cfg/01-b8-27-eb-fc-64-a6
Waiting for Ethernet connection... done.
Using smsc95xx_eth device
TFTP from server 192.168.1.10; our IP address is 192.168.1.100
Filename 'pxelinux.cfg/01-b8-27-eb-fc-64-a6'.
Load address: 0x2500000
Loading: ################################################## 64 Bytes
0 Bytes/s
done
Bytes transferred = 64 (40 hex)
Config file '<NULL>' found
U-Boot>
=================================== short test summary info ===================================
--
Tom
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]
prev parent reply other threads:[~2024-05-28 21:30 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-28 9:03 [PATCH v5] test/py: net_boot: Add test cases for net boot Love Kumar
2024-05-28 21:30 ` Tom Rini [this message]
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=20240528213024.GA546015@oliver.lan \
--to=trini@konsulko.com \
--cc=git@xilinx.com \
--cc=love.kumar@amd.com \
--cc=michal.simek@amd.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