-
-
Notifications
You must be signed in to change notification settings - Fork 6.7k
tests/server/dnsd: basic DNS server for test suite #17015
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Conversation
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
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
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
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.