[U-Boot] net: [PATCH v10 3/3] Adding wget

Simon Glass sjg at chromium.org
Mon May 14 19:51:46 UTC 2018


Hi Duncan,

On 14 May 2018 at 09:26, Duncan Hare <dh at synoia.com> wrote:
> From: Simon Glass <sjg at chromium.org>
>
>
> To: Duncan Hare <dh at synoia.com>
> Cc: "joe.hershberger at ni.com" <joe.hershberger at ni.com>; U-Boot Mailing List
> <u-boot at lists.denx.de>
> Sent: Sunday, May 13, 2018 3:00 PM
> Subject: Re: net: [U-Boot] [PATCH v10 3/3] Adding wget
>
>>>>>
>>>>>Please setup a test that can run in an environment without the
>>>>>Internet. That is critical for unit tests.
>>>>>
>>>>>Hand tests for Internet usage and the environmental effects are great,
>>>>>but that can't be what we include in the auto tests for repeat-ability
>>>>>reasons. Simon is asking for a separate type of test.
>>>>
>>>> Is the test environment another patch in the series or an addition to
>>>> the
>>>> wget patch?
>
>>I suggest a separate patch.
>>
>>Regards,
>>>Simon
>
> Separate patch, patch 4 of the series or a completely new patch?

Patch 4 in the series.

>
> Conceptual approach:
>
> apt-get install nginx (in debian)
>
> I'll provide a config file pointing to test kernel a a specified file
> location.
>
> Test kernel will be numbered lines of printable characters. Printable, not
> binary, easy to expand in a spreadsheet.
>
> Can the u-boot print command print sections of memory? That is
>
> print $loadaddr $length?
>
> That will work for small test kernels, or
>
> I tested by using tftp to download a kernel, then used a modified wget to
> download a seconf time and verify the
> downloads were identical.
>
> compare $loadaddr1 $loadaddr2 $length
>
> Is that a preferred approach?

You don't need to download a kernel. Just download a small file (say
10KB) that you generate in your test. You might find test_vboot.py and
test_net.py helpful. Something like:

- start an http server on localhost (in Python)
- put a single file in the server that can be read (generate 10KB of
known data?)
- run U-Boot with the commands to wget from that server
- check that U-Boot gets the expected file

Regards,
Simon


More information about the U-Boot mailing list