tests/server/dnsd: basic DNS server for test suite#17015
Closed
tests/server/dnsd: basic DNS server for test suite#17015
Conversation
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
Currently the DNS server only responds to A and AAAA queries. It always responds with a fixed response: the localhost address. Three times. It should work fine over either IPv4 or IPv6, but I don't think it matters much for curl testing. The idea is to allow curl tests to use "normal" DNS hostnames (using the normal name resolving code paths) and still use the local test servers. This setup currently only works if curl is built with c-ares because redirecting DNS requests to our test server when using getaddrinfo() is not easy. This should be extended to respond to HTTPS queries as well to allow more testing there, as c-ares is always used for that. Test 2102 is the first test using this.
0b14222 to
df0cbaa
Compare
Member
Author
|
There is lots more to do when it comes to testing with a DNS server present, but I want to land this initial work as a first shot and then we can keep on expanding on this:
|
nbaws
pushed a commit
to nbaws/curl
that referenced
this pull request
Apr 26, 2025
Currently the DNS server only responds to A and AAAA queries. It always responds with a fixed response: the localhost address. Three times. It should work fine over either IPv4 or IPv6, but I don't think it matters much for curl testing. The idea is to allow curl tests to use "normal" DNS hostnames (using the normal name resolving code paths) and still use the local test servers. This setup currently only works if curl is built with c-ares because redirecting DNS requests to our test server when using getaddrinfo() is not easy. This should be extended to respond to HTTPS queries as well to allow more testing there, as c-ares is always used for that. Test 2102 is the first test using this. Closes curl#17015
nbaws
pushed a commit
to nbaws/curl
that referenced
this pull request
Apr 26, 2025
Currently the DNS server only responds to A and AAAA queries. It always responds with a fixed response: the localhost address. Three times. It should work fine over either IPv4 or IPv6, but I don't think it matters much for curl testing. The idea is to allow curl tests to use "normal" DNS hostnames (using the normal name resolving code paths) and still use the local test servers. This setup currently only works if curl is built with c-ares because redirecting DNS requests to our test server when using getaddrinfo() is not easy. This should be extended to respond to HTTPS queries as well to allow more testing there, as c-ares is always used for that. Test 2102 is the first test using this. Closes curl#17015
vszakats
added a commit
to vszakats/curl
that referenced
this pull request
Jan 15, 2026
Follow-up to df2b4cc curl#18157 Follow-up to 02e9690 curl#17015
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Currently the DNS server only responds to A and AAAA queries. It always responds with a fixed response: the localhost address. Three times.
It should work fine over either IPv4 or IPv6, but I don't think it matters much for curl testing.
The idea is to allow curl tests to use "normal" DNS hostnames (using the normal name resolving code paths) and still use the local test servers.
This setup currently only works if curl is built with c-ares.
This should be extended to respond to HTTPS queries as well to allow more testing there, as c-ares is always used for that.
Test 2102 is the first test using this.