cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Debugging test cases

From: Joe Halpin <j.p.h_at_comcast.net>
Date: Sun, 28 Mar 2004 12:24:30 -0600

Daniel Stenberg wrote:
> On Sat, 27 Mar 2004, Joe Halpin wrote:
>
>>I'm trying to figure out why some test cases are failing on my Solaris box.
>>I was having a little trouble trying to use gdb because the README file in
>>the tests directory says I should be able to just type run to start things
>>off. however, that results in an error about curl not being in executable
>>format (because what it's pointed to is a script).
>
> Right, "runtests.pl -g" assumes that configure --disable-shared has been used.
> I guess the proper fix for this is to use libtool somehow to start gdb,
> instead of just blindly assume that 'curl' is the final executable.

Ok, I rebuilt it with --disable-shared and ran it in the debugger. The
problem is that getnameinfo() is failing with a return of 3, which means
invalid argument. After poking around I found that if I unset the
NI_WITHSCOPEID bit in the flags argument it works, and all tests pass.

This doesn't make sense to me because NI_WITHSCOPEID is defined in
netdb.h. Anyone here have a clue about this? This is Solaris 9 (Intel)
with gcc 3.3.2 (from sunfreeware.com).

Joe
Received on 2004-03-28