cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: TFTP Option Negotiation

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Sat, 27 Dec 2008 23:29:47 +0100 (CET)

On Sat, 27 Dec 2008, Chad Monroe wrote:

>> it would be great if you also could take a look and see if you can
>> extend/make the test suite's TFTP-server to support this and excerise some
>> of this new logic in a test case or two.
>
> I have the libcurl code done according to what we've talked about in this
> thread, but am struggling a bit adding some test cases. I ran through all of
> the existing test cases today and they run fine with the new code in place,
> but it doesn't test the option negotiation at all.

Well, running the existing tests (and your own use cases) fine are of course
a very good start and a precondition for the code to get accepted.

> I looked at and started modifying the test TFTP server code a bit but am not
> happy with the results yet. Would you like me to add full option negotiation
> support to the server side as well so we can add test cases which use
> varying block sizes, or is there some other way you'd prefer to see this
> done?

I haven't read up on the details on how this TFTP negotiation is being done,
but in general the test servers don't necessarily have to be that clever, to
actually support "the real thing". They merely need to have a way to send
custom things and record what it gets back, and then we can make up test cases
that make the server send the right things and make sure the client (curl)
deals with it fine, but we can also make sure the server sends the _wrong_
thing and verify the client in that aspect as well.

> Adding option negotiation support to the test server is probably as much or
> more work than adding it to libcurl, so I want to make sure this is
> something necessary before finishing the work.

It's certainly not _necessary_, only a good thing to make sure the
functionality is there, is solid and will remain so when things change ahead.

> Also, since I have the library code mostly complete, I could submit that
> patch in the near future and continue to work on updating the test server
> later, or I could wait until it's all done and submit one big patch, though
> it will probably take a bit longer. Whatever approach is easiest for you
> works for me.

I'm glad to hear the patch is near arrival!

I'd say the patch should be separated into two separate ones to make them
easier to digest and review! Please send over the libcurl patch once you have
something you want reviewed/applied and we'll have a look. With the TFTP
negotiation code in place, the chances of someone else helping out with
getting it tested by the test suite also increases!

-- 
  / daniel.haxx.se
Received on 2008-12-27