cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: [PATCH] TFTP client's bad behaviour when unexpected block isreceived and not optimal timeouts

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Wed, 5 Oct 2011 23:59:52 +0200 (CEST)

On Wed, 5 Oct 2011, Marcin Adamski wrote:

> I don't really know how to write such test. Basically we need to simulate
> reception of unexpected blocks. Test for timeouts would be useful as well.

I'd suggest something similar to what we've done several times for other
protocols: we add commands within the <servercmd> tag (see tests/FILEFORMAT)
and then we make the tftpd server read those for each test. We then introduce
commands that will cause the server to behave as we want.

The tests/server/tftpd.c:validate_access() function already reads the <reply>
tag so it would be easy to make it read another tag for these custom commands.

See for example the tests 271 283 284 285 and 286 for existing TFTP tests.

-- 
  / daniel.haxx.se
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette:  http://curl.haxx.se/mail/etiquette.html
Received on 2011-10-06