This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: How to test a patch in resolv/?
- From: Siddhesh Poyarekar <sid at reserved-bit dot com>
- To: Florian Weimer <fweimer at redhat dot com>, Stan Shebs <stanshebs at google dot com>
- Cc: GNU C Library <libc-alpha at sourceware dot org>, ashankar at redhat dot com
- Date: Wed, 7 Oct 2015 10:17:58 +0530
- Subject: Re: How to test a patch in resolv/?
- Authentication-results: sourceware.org; auth=none
- References: <CA+5-Q5KH4NS8V8GPX0YeQwq59UHWSn7eimmbZ=47jhJae5oqLA at mail dot gmail dot com> <56141DBB dot 7010902 at redhat dot com>
On Wednesday 07 October 2015 12:45 AM, Florian Weimer wrote:
> You can use static linking to poke at library internals reliably, if
> that helps.
>
> It used to be possible to override the configured name servers by
> directly writing to the _res structure. This would make it possible to
> redirect DNS queries to a custom test server (either in another thread
> or process). I don't know if current libresolv versions still support that.
Another way would be to write a custom resolver that sends crafted
responses. I know QE in Red Hat does this with a perl script. Arjun
(in cc now) plans to write such installed-tree tests in future.
Siddhesh