Hi PaulLiu,

On Mon, 17 Oct 2022 at 01:03, PaulLiu <paul...@debian.org> wrote:
>
> Hi Simon,
>
> I think it is a bit hard for me to test it right now. It seems that we need 
> to setup a fake HTTP server?
> It can be easily done by some python scripts but I'm not sure how to start.
> Is there some example on testing the network commands? Like tftp or nfs?

See test/dm/eth.c for some examples.

It is better if you can have the test contained, rather than requiring
starting up a separate server. E.g. you can write a small test in C
which sends an http request, handles the reply and then checks that
the data is received. At present sandbox supports storing one packet,
but that could be extended if not enough.

Regards,
Simon


>
> Yours,
> Paul
>
>
> On Tue, Jul 12, 2022 at 7:00 PM Simon Glass <s...@chromium.org> wrote:
>>
>> Hi Ying-Chun,
>>
>> On Fri, 8 Jul 2022 at 12:02, Ying-Chun Liu (PaulLiu)
>> <paul....@linaro.org> wrote:
>> >
>> > From: "Ying-Chun Liu (PaulLiu)" <paul....@linaro.org>
>> >
>> > Currently file transfers are done using tftp or NFS both
>> > over udp. This requires a request to be sent from client
>> > (u-boot) to the boot server.
>> >
>> > The current standard is TCP with selective acknowledgment.
>> >
>> > Signed-off-by: Duncan Hare <d...@synoia.com>
>> > Signed-off-by: Duncan Hare <duncanch...@yahoo.com>
>> > Signed-off-by: Ying-Chun Liu (PaulLiu) <paul....@linaro.org>
>> > Cc: Christian Gmeiner <christian.gmei...@gmail.com>
>> > Cc: Joe Hershberger <joe.hershber...@ni.com>
>> > Cc: Michal Simek <michal.si...@xilinx.com>
>> > Cc: Ramon Fried <rfried....@gmail.com>
>> > ---
>> > v1-v12: Made by Duncan, didn't tracked.
>> > v13: Fix some issues which is reviewed by Christian
>> > v14: Add options to enable/disable SACK.
>> > v15: Fix various syntax errors reviewed by Michal.
>> >      Remove magic numbers. Use kernel-doc format.
>> > v16: Add more kernel-doc. Fix more double spaces.
>> > ---
>> >  include/net.h     |  36 ++-
>> >  include/net/tcp.h | 312 ++++++++++++++++++++
>> >  net/Kconfig       |  16 ++
>> >  net/Makefile      |   1 +
>> >  net/net.c         |  30 ++
>> >  net/tcp.c         | 720 ++++++++++++++++++++++++++++++++++++++++++++++
>> >  6 files changed, 1106 insertions(+), 9 deletions(-)
>> >  create mode 100644 include/net/tcp.h
>> >  create mode 100644 net/tcp.c
>>
>> This looks good to me.
>>
>> Reviewed-by: Simon Glass <s...@chromium.org>
>>
>> Can we get a test for this? Perhaps a fake Ethernet driver in sandbox
>> / drivers/net?

Reply via email to