1
0
mirror of https://frontier.innolan.net/rainlance/c-ares.git synced 2025-10-05 14:49:27 +00:00
Commit Graph

1665 Commits

Author SHA1 Message Date
2b6a1fbee7 Document callback type in man page for ares_set_socket_callback 2016-02-09 10:08:23 -08:00
11e37a92ef Add ares_set_socket_configure_callback()
This function sets a callback that is invoked after the socket is
created, but before the connection is established.  This is an ideal
time to customize various socket options.
2016-02-09 10:05:04 -08:00
87d641a907 test: ares_set_socket_callback failure behaviour 2016-02-09 16:14:37 +00:00
2bae2d56d7 test: Check ares_parse_txt_reply_ext() entrypoint 2016-02-04 10:09:22 +00:00
53c2186e18 txt: introduce ares_parse_txt_reply_ext
Introduce `ares_txt_ext` structure with an extra `record_start`
field, which indicates a start of a new TXT record, thus allowing to
differentiate the chunks in the same record, from a chunks in a
different record.

Introduce a new API method: `ares_parse_txt_reply_ext` that works with
this kind of struct.
2016-02-04 10:00:59 +00:00
0c4c1ca9bc doc: Update missed repo references 2016-02-02 11:33:16 +00:00
adc95e6bd6 doc: Update docs on contributing 2016-02-02 11:31:13 +00:00
03ba16fe7a test: Run command line tools in Travis
Do a quick execution of each of the command line tools
in the continuous integration build, so that any (say)
sanitizer failures show up.
2016-02-02 11:02:28 +00:00
3f301a6fe3 acountry: drop inert test
If ver_1 is true, then z0 and z1 must both be 'z', and so
(z0 != 'z' && z1 != 'z') can never be true.

CID 56879, pointed out by Coverity.
2016-02-02 10:56:54 +00:00
d4a549c78b doc: update badge locations to master repo 2016-02-02 10:48:15 +00:00
6f1862f884 test: Enable maintainer mode + debug in Travis 2016-02-02 10:33:27 +00:00
31ca57671e test: Add an iOS build target 2016-02-02 10:13:49 +00:00
c9579872c8 test: Ignore SIGPIPE in tests 2016-02-02 10:13:49 +00:00
86beb81892 test: More initialization tests 2016-02-02 10:13:49 +00:00
ff1f7a1c3c test: Improve containerized test mechanism
Aim is to ensure that code coverage information can escape the
container.  To do this:
 - Enter a new mount namespace too, so that we can...
 - Bind mount the expected source directory into the container
 - Share memory with the sub-process so coverage information is
   shared too.
2016-02-02 10:13:49 +00:00
b644412a66 test: Make contained tests easier to write 2016-02-02 10:13:49 +00:00
5dc450a4b3 test: Add framework for containerized testing
On Linux we can potentially use user and UTS namespaces to run  a test
in a pseudo-container with:
 - arbitrary filesystem (e.g. /etc/resolv.conf, /etc/nsswitch.conf, /etc/hosts)
 - arbitrary hostname/domainname.

Include a first pass at the framework code to allow this, along with a
first test case that uses the container.
2016-02-02 10:13:49 +00:00
439eb45cc0 test: Use a longer timeout for less flakiness
Having occasional test failures from timeout before multiple
queries can complete, so up the default timeout for the test
from 100ms to 1500ms.
2016-02-02 10:13:49 +00:00
78f9ec5515 test: Make failure tests more robust
Different platforms will do different numbers of allocations
in the processing of a given API call; just check that the
return code is either success or ENOMEM, and free off any
returned state in the former case.

Also cope with ECONNREFUSED as well as ENOTFOUND.
2016-02-02 10:13:48 +00:00
3478963873 test: Get test code building under Windows
- Initial nmake file based off library nmake file
 - Cast socket call arguments to (char *)
 - Use wrapper sclose() that maps to closesocket() or close()
 - Build a config.h indicating presence of headers
 - Conditionally include netdb.h
 - Remove unnecessary include of sys/socket.h
 - Force longer bitmask for allocation failure tracking
 - Call WSAStartup() / WSACleanup() in main()
 - Set TCP_NODELAY for mock server
 - Turn on tests in AppVeyor build
2016-02-02 10:13:48 +00:00
830e8fe2b3 test: Disable tests that manipulate env on Windows 2016-02-02 10:13:48 +00:00
d3bccff740 test: Move file lists into Makefile.inc
In preparation for a Win32 build of the test suite.
2016-02-02 10:13:48 +00:00
9edf9411c7 test: Add a simple multi-server test
Check rotate option does something
2016-02-02 10:13:48 +00:00
d448d6604f test: Allow for multiple mock servers
- Update the MockServer to allow separate specification of
   UDP and TCP ports
 - Have an array of mock servers listening on consecutive
   sets of ports.
 - Rename Process(fd) to ProcessFD(fd) to avoid confusion.
 - Initialize channel by using the new ares_set_servers_ports()
   entrypoint, so multiple ports on the same loopback address
   can be used.
2016-02-02 10:13:48 +00:00
92656bcc82 test: Update test for set/get_servers variants
Ports are significant in the _ports_ variant functions, so update test to cope.
2016-02-02 10:13:48 +00:00
3231480a85 test: Make GetNameServers() utility function port-aware
Also make it generally available.
2016-02-02 10:13:48 +00:00
e26a678f26 test: more testing, including of internal static functions 2016-02-02 10:13:48 +00:00
25adcc413e test: more tests, especially fallback processing
- Make mock server listen on UDP + TCP in parallel.
 - Test UDP->TCP fallback on truncation
 - Test EDNS->no-EDNS fallback
 - Test some environment init options
 - Test nonsense reply

test: short response
2016-02-02 10:13:48 +00:00
a05f240dea test: more tests, particularly of initialization 2016-02-02 10:13:48 +00:00
83839fde7a test: Run mock tests over both TCP and UDP
With the exception of a few tests that make use of the timed
retry aspect of UDP.
2016-02-02 10:13:48 +00:00
0c423efd78 test: Run mock tests over both IPv4 and IPv6 2016-02-02 10:13:48 +00:00
0ef56333a0 test: Add more tests for edge cases 2016-02-02 10:13:48 +00:00
ce3f896572 test: more nooks and crannies of pton functions 2016-02-02 10:13:48 +00:00
f939efe7df test: More tests for PTR parsing 2016-02-02 10:13:48 +00:00
a2c5b1d378 test: Use of HOSTALIAS environment variable 2016-02-02 10:13:48 +00:00
834c98e9d9 test: Add RAII utility classes for testing
- TempFile holds specific contents
 - EnvValue sets an environment variable
2016-02-02 10:13:48 +00:00
693e566b66 test: More search domain scenarios 2016-02-02 10:13:47 +00:00
3ce586feb7 test: Remove duplicate flags from Makefile.am 2016-02-02 10:13:47 +00:00
6589ebfd6a test: Make test code leak-free 2016-02-02 10:13:47 +00:00
4a09121923 test: More tests
- test use of sortlist
 - test gethostbyname(AF_UNSPEC)
2016-02-02 10:13:47 +00:00
f2ae5d72da test: Test ares_gethostbyname_file() 2016-02-02 10:13:47 +00:00
0c03bee6ed test: Add more tests of ares_getnameinfo() 2016-02-02 10:13:47 +00:00
ffc7c52656 test: Tweak tests, add alloc failure test 2016-02-02 10:13:47 +00:00
e3434ef33f test: Test init with options 2016-02-02 10:13:47 +00:00
a48447ee27 test: More tests
- ares_inet_net_pton() variants
 - ares_getsock() variants
2016-02-02 10:13:47 +00:00
f9b9817d1d test: Expose ProcessWork() function 2016-02-02 10:13:47 +00:00
c778f0136b test: More parsing tests
Including:
 - Split each parse function test set out into separate files.
 - Add an allocation failure test for each parsing function.
 - Add error check test for each parsing function.
2016-02-02 10:13:47 +00:00
79dc327a2d test: Add various additional tests 2016-02-02 10:13:47 +00:00
5da3201a05 test: More tests
Include tests of internal functions, based on the value of the
CARES_SYMBOL_HIDING macro; need to configure the library with
--disable-symbol-hiding to enable these tests.
2016-02-02 10:13:47 +00:00
3907b6dc68 test: Allow command line override of mock server port 2016-02-02 10:13:47 +00:00