curl-library
Re: Debugging test failures
Date: Mon, 8 Mar 2004 08:52:48 +0100 (CET)
On Sat, 6 Mar 2004, Joe Halpin wrote:
> Given the following output, how would I go about finding the source of
> this output so I can figure out what the failure is?
>
> test 101...[FTP dir list, PORT with specified IP]
>
> data FAILED:
This line above means that the 'data' comparison failed. The transfered data
didn't match the assumed result.
> --- .expected Sat Mar 6 13:16:41 2004
> +++ .generated Sat Mar 6 13:16:41 2004
The '.expected' file is what the test suite expexted the output to look like
and the '.generated' is that was actually written
> -total 20^M
> -drwxr-xr-x 8 98 98 512 Oct 22 13:06 .^M
> -drwxr-xr-x 8 98 98 512 Oct 22 13:06 ..^M
> -drwxr-xr-x 2 98 98 512 May 2 1996 .NeXT^M
> --r--r--r-- 1 0 1 35 Jul 16 1996 README^M
> -lrwxrwxrwx 1 0 1 7 Dec 9 1999 bin -> usr/bin^M
> -dr-xr-xr-x 2 0 1 512 Oct 1 1997 dev^M
> -drwxrwxrwx 2 98 98 512 May 29 16:04 download.html^M
> -dr-xr-xr-x 2 0 1 512 Nov 30 1995 etc^M
> -drwxrwxrwx 2 98 1 512 Oct 30 14:33 pub^M
> -dr-xr-xr-x 5 0 1 512 Oct 1 1997 usr^M
This output is a 'diff -u' output beetween those two files. If it worked
nicely, there would have been no output. Now we can see that there's a dash in
front of all lines, which means that all those lines were in the expected file
but not in the generated.
curl failed to get the data it should. There was nothing in the output file!
To figure out why, check the other logs/* files to see if they offer any
hints.
Try running this test case only (./runtests [num]), and if that fails as well,
you can start the more involved debugging by running './runtests -g [num]'
which fires up gdb to allow you to run curl with it to debug it for this test
case setup.
-- Daniel Stenberg -- http://curl.haxx.se/ -- http://daniel.haxx.se/ [[ Do not send mails to this email address. They won't reach me. ]]Received on 2004-03-08