cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: [PATCH v2] NTLM tests: boost coverage by forcing the hostname

From: Kamil Dudka <kdudka_at_redhat.com>
Date: Sat, 3 Jul 2010 00:32:55 +0200

On Friday 02 of July 2010 23:53:12 Daniel Stenberg wrote:
> I ran into another problem first, before I got a chance to check what
> you're talking about up there!
>
> I tend to build my dev version with configure --disable-shared, and when I
> do that I get no libhostname.so for the LD_PRELOAD, I only get a
> libhostname.a built which of course causes the preload to fail[*]. The nice

Sorry for the mess. I think the proper solution would be to make sure
the LD_PRELOAD solution is used only when the shared library is indeed
there. I hope we can hook it somehow into the perl script.

> part is of course that your logic in sethostname.c is then perfectly
> getting the name with the environment variable instead and the test can
> still work!

Nope, the logic in sethostname.c looks fine. I've just badly broken the perl
script. The 'tests/libtest/chkhostname' helper works fine to detect both of
the overriden solutions. However the 'precheck' tag now always passes after
my awkward chage of runtests.pl. I think I should not touch any perl
code :-)

> [*] = if I use valgrind when doing the LD_PRELOAD failure, it goes
> completely bananas and shows me a long series of:
>
> Read 8 invalid bytes
>
> Conditional jump or move depends on uninitialised value(s)
>
> ... and I've had to ctrl-c break that output. So something is not quite
> right there. Or here perhaps is a better term to use!

I see it more likely as problem of the dynamic linker. If something points to
the newly added code, the backtrace would be quite helpful. I don't see them
on my box.

Kamil
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2010-07-03