From mboxrd@z Thu Jan 1 00:00:00 1970 From: Simon Glass Date: Mon, 14 May 2018 13:51:46 -0600 Subject: [U-Boot] net: [PATCH v10 3/3] Adding wget In-Reply-To: <485806508.1037928.1526311564721@mail.yahoo.com> References: <20180414234336.26636-1-DH@synoia.com> <20180414234336.26636-4-DH@synoia.com> <217820715.1487025.1524002336830@mail.yahoo.com> <2109276801.3390689.1524453754403@mail.yahoo.com> <2098767198.759415.1524666799073@mail.yahoo.com> <566131510.980666.1524700329499@mail.yahoo.com> <2087144993.768107.1526245517987@mail.yahoo.com> <485806508.1037928.1526311564721@mail.yahoo.com> Message-ID: List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi Duncan, On 14 May 2018 at 09:26, Duncan Hare wrote: > From: Simon Glass > > > To: Duncan Hare > Cc: "joe.hershberger at ni.com" ; U-Boot Mailing List > > 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