curl-library
RE: testsuite failure -- test 91
Date: Thu, 18 Dec 2003 12:13:31 +0100 (CET)
On Wed, 17 Dec 2003, David Byron wrote:
> When things don't work, the output is:
>
> Curl_read worked OK (nread = 253)
> Curl_read worked OK (nread = -1)
> curl: (52) Empty reply from server
Ah, very nice tracking!
> Somehow using --verbose (or running in gdb with breakpoints, etc.) is
> changing the timing such that the read function (sread on line 420 of
> sendf.c (1.72)) returns some data instead of returning -1.
>
> Maybe it's a bug in sws just as much as a bug in curl. Does the server need
> to go faster? What if it's a real network and the line is slow?
Right, this seems like it might be a sws/test suite bug rather than a bug in
libcurl itself. I'll have to dig into the details of this test again to see if
I can understand this failure.
> One other question...how come readdone is initialized to TRUE (somewhere
> around line 239 of transfer.c)? It doesn't seem to make a difference if
> it's initialized to FALSE, at least in this test case, but FALSE seems
> somehow more intuitive to me.
Once upon a time we inited readdone to FALSE, to allow it to loop in there.
That did however cause some odd side-effects which made me go back to the
non-loop version, and I did that change by initing the variable to TRUE. We
should instead remove all uses of that variable
The odd effects included things like bad progress meter updates and more.
Also, I found out that the performance gain with the loop was next to none so
it didn't improve anything.
> Hope this helps....Still hoping I can find the solution, but I could use a
> push in the right direction.
Check the log/sws.log file after a test failure to see if it includes anything
out of interest.
In my end, I've changed the order data is checked in the test script so that
protocol and data are checked before the return code is checked, which can
prove useful for this as the failed read will make the downloaded data not to
be what the test itself expects. It'll show exactly when it breaks.
-- Daniel Stenberg -- http://curl.haxx.se/ -- http://daniel.haxx.se/ [[ Do not send mails to this email address. They won't reach me. ]] ------------------------------------------------------- This SF.net email is sponsored by: IBM Linux Tutorials. Become an expert in LINUX or just sharpen your skills. Sign up for IBM's Free Linux Tutorials. Learn everything from the bash shell to sys admin. Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=clickReceived on 2003-12-18