kc3-lang/libevent/test/regress_dns.c

Branch :


Log

Author Commit Date CI Message
b17b0eec 2011-11-15 17:11:42 Fix DNS memleak checks when running with malloc-replacement/debugging disabled
3c824bd3 2011-10-24 13:18:09 Update copyright dates to 2011.
5e42202d 2011-10-19 22:41:11 Style and comment tweaks for dns/leak* tests
f7841bfc 2011-10-18 17:49:40 Test for commit aff6ba1
21a08d68 2011-10-19 22:38:37 Empty DNS reply with OK status is another way to say NODATA. Sometimes DNS reply has nothing but query section. It does not look like error, so it should be treated as NODATA with TTL=0 as soon as there is no SOA record to deduce negative TTL from.
d58c15ee 2011-10-19 22:36:12 Tests for 94fba5b and f72e8f6
48c44a6d 2011-04-11 17:48:23 Refactor test_getaddrinfo_async_cancel_stress() Turns out it didn't need an event base set up. Spotted by clang's static anaylzer
bbf55150 2011-02-13 01:25:33 Include util-internal.h as needed to build on platforms with no sockaddr_storage
c0bf63ce 2010-12-02 14:13:33 tests: Use relative includes ("") instead of system includes (<>)
4f332091 2010-12-02 14:09:52 tests: Use new event2 headers instead of old compatibility headers.
7bcace2d 2010-11-22 21:02:34 Fix some irix compilation warnings spotted by Kevin Bowling
da1bf528 2010-11-22 16:24:09 Add a stress test for getaddrinfo_cancel
a97320ac 2010-09-03 18:48:31 Allow more than one copy of regression tests to run at once Mostly this was a matter of just removing all the hardwired ports in the test code. The http/connection_retry test is still a little screwy, though.
ec347b92 2010-07-07 16:45:03 Move event-config.h to include/event2 This change means that all required include files are in event2, and all files not in event2/* are optional.
840a72fb 2010-07-29 20:32:40 Fix badly-behaved subtest of dns/bufferevent_connect_hostname The bufferevent_connect_hostname test was specifying AF_INET, but the gethostbyname test we were using to see what error to expect was using PF_UNSPEC, leading to possible divergence of results.
f89168e7 2010-05-08 19:11:50 Make test for bufferevent_connect_hostname system-neutral Previously, the be5_outcome field for the dns error would be set to something dependent on our system resolver. It turns out that you can't rely on nameservers to really give you an NEXIST answer for xyz.example.com nowadays: too many of them are annoyingly broken and like to redirect you to their locked-in portals. This patch changes the bufferevent_connect_hostname test so that it makes sure that the dns_error of be5_outcome is "whatever you would get from resolving the target hostname"
0ef40706 2010-04-24 00:06:38 Report DNS error when lookup fails during bufferevent_socket_connect_hostname.
39b870b8 2010-04-22 21:49:05 Add dns/search_cancel unit test.
899c1dcc 2010-04-14 15:42:57 Replace EVUTIL_CLOSESOCKET macro with a function The EVUTIL_CLOSESOCKET() macro required you to include unistd.h in your source for POSIX. We might as well turn it into a function: an extra function call is going to be cheap in comparison with the system call. We retain the EVUTIL_CLOSESOCKET() macro as an alias for the new evutil_closesocket() function. (commit message from email by Nick and Sebastian)
274a7bd9 2010-03-13 00:55:39 Fix some memory leaks in the unit tests These don't matter except inasmuch as they give real memory leaks a place to hide. Found with valgrind
17efc1cd 2010-03-04 01:25:51 Update all our copyright notices to say "2010"
4faeaea9 2010-02-19 03:39:50 Clean up formatting: function/keyword spacing consistency. - Keywords always have a space before a paren. Functions never do. - No more than 3 blank lines in a row.
e5bbd40a 2010-02-18 17:41:15 Clean up formatting: use tabs, not 8-spaces, to indent.
d4de062e 2010-02-10 17:19:18 Add an arc4random implementation for use by evdns Previously, evdns was at the mercy of the user for providing a good entropy source; without one, it would be vulnerable to various active attacks. This patch adds a port of OpenBSD's arc4random() calls to Libevent [port by Chris Davis], and wraps it up a little bit so we can use it more safely.
1dd7e6dc 2010-02-05 01:16:23 Remove the 'flags' argument from evdns_base_set_option() The 'flags' argument made sense when passed to evdns_(base_)?parse_resolv_conf when it said which parts of the resolv.conf file to obey. But for evdns_set_option(), it was really silly, since you wouldn't be calling evdns_set_option() unless you actually wanted to set the option. Its meaning was basically, "set this to DNS_OPTIONS_ALL unless you want a funny surprise." evdns_base_set_option was new in 2.0.1-alpha, so we aren't committed to keeping it source-compatible.
b8226390 2010-01-14 16:53:25 move dns utility functions into a separate file so that we can use them for http testing
a334b31c 2010-01-14 14:46:16 More unit tests for getaddrinfo_async: v4timeout and cancel. One covers the case where the v4 request times out but the v6 request doesn't. The other makes sure that cancelling a request actually works.
72dd6667 2009-12-07 17:21:41 evdns_getaddrinfo() now supports the /etc/hosts file. The regular blocking evutil_getaddrinfo() already supported /etc/hosts by falling back to getaddrinfo() or gethostbyname(). But evdns_getaddrinfo() had no such facility. Now it does. The data structure here isn't very clever. I guess people with huge /etc/hosts files will either need to get out of the 1980s, or submit a patch to this code so that it uses a hashtable instead of a linked list. Includes basic unit tests.
1e56a32d 2009-12-29 16:04:16 Make the initial nameserver probe timeout configurable. When we decide that a nameserver is down, we stop sending queries to it, except to periodically probe it to see if it has come back up. Our previous probe sechedule was an ad-hoc and hard-wired "10 seconds, one minute, 5 minues, 15 minutes, 1 hour, 1 hour, 1 hour...". There was nothing wrong with having it be ad-hoc, but making it hard-wired served no good purpose. Now the user can set the initial timeout via a new "initial-probe-timeout:" option; future timeouts back off by a factor of 3 on every failure to a maximum of 1 hour. As a side-benefit, this lets us cut the runtime of the dns/retry test from about 40 seconds to about 3 seconds. Faster unit tests are always a good thing.
7511b6a9 2009-11-19 00:21:38 Fix a spelling error and remove some dead code svn:r1551
888007f9 2009-11-17 02:38:19 Windows *does* have getservbyname, no matter what autoconf says. TODO: figure out why autoconf is confused about this. svn:r1538
86f57420 2009-11-16 22:25:46 Add two implementations of getaddrinfo: one blocking and one nonblocking. The entry points are evutil_getaddrinfo and evdns_getaddrinfo respectively. There are fairly extensive unit tests. I believe this code conforms to RFC3493 pretty closely, but there are probably more issues. It should get tested on more platforms. This code means we can dump the well-intentioned but weirdly-implemented bufferevent_evdns and evutil_resolve code. svn:r1537
72bafc17 2009-11-16 22:23:55 Remove the stupid brokenness where DNS option names needed to end with a colon. svn:r1536
784b8773 2009-11-06 21:46:57 We do not work any more without an event-config.h; stop pretending that it is meaningful to check for HAVE_CONFIG_H svn:r1516
ac633aeb 2009-11-05 21:22:23 Fix some build warnings on MSVC, mostly related to signed/unsigned comparisons. svn:r1510
0b9eb1bf 2009-11-03 20:40:48 Add a bufferevent function to resolve a name then connect to it. This function, bufferevent_socket_connect_hostname() can either use evdns to do the resolve, or use a new function (evutil_resolve) that uses getaddrinfo or gethostbyname, like http.c does now. This function is meant to eventually replace the hostname resolution mess in http.c. svn:r1496
9976f1e7 2009-10-29 17:11:12 reformat weird indentation in dns tests svn:r1478
3c2198cb 2009-10-29 17:10:36 Unit test for reverse ipv6 lookup svn:r1477
50825466 2009-10-21 02:14:16 Fix windows compilation warnings. svn:r1449
0c09fe5a 2009-08-03 20:50:56 Add a couple more evdns tests. Libevent is now, for me, at 80.02% coverage. svn:r1409
94e8f9b9 2009-08-03 20:15:45 Another DNS unit tests, to handle reissues. The evdns module is now up to ~72% coverage; Libevent is up to nearly 80%. svn:r1408
dc1f5b1e 2009-08-03 20:15:39 why say fprintf(stdout, X) when you can say printf? svn:r1407
213dc2a2 2009-08-03 20:15:32 Fix an annoying evdns crash bug, and add more unit tests for evdns. svn:r1406
a5006d80 2009-08-03 16:15:57 Unit tests for DNS search. svn:r1405
72ea534f 2009-07-28 19:41:57 Export evutil_str[n]casecmp as evutil_ascii_str[n]casecmp. svn:r1387
a826a758 2009-07-28 19:41:48 Some tweaks to Brodie Thesfield's MSVC patch. svn:r1386
5b5b880b 2009-07-28 19:41:39 Various MSVC cleanups from Brodie Thiesfield. svn:r1385
d866f055 2009-07-13 20:03:00 Patch from Zack Weinberg: normalize perror() tt functions and add tt_fail/tt_abort_printf svn:r1340
ea664bf2 2009-04-21 18:46:30 Refactor test wrappers to divide legacy items from useful stuff. svn:r1212
4d8919ec 2009-04-19 01:58:26 Do not try to double-free the nameserver in regression test svn:r1202
d2e9caa6 2009-04-06 20:38:19 Fix evdns_cancel to alert callback and free associated RAM. Also, we add a test to make sure evdns_cancel is working properly. svn:r1139
d9628ef4 2009-01-31 18:36:08 Add missing initializers svn:r1082
eac75f91 2009-01-31 07:32:14 Port DNS tests. svn:r1081
b85b710c 2009-01-27 22:34:36 Update copyright statements to reflect the facts that: a) this is 2009 b) niels and nick have been comaintainers for a while c) saying "all rights reserved" when you then go on to explicitly disclaim some rights is sheer cargo-cultism. svn:r1065
8889a770 2009-01-27 22:30:46 Replace all use of config.h with event-config.h. svn:r1064
a077fb8c 2009-01-22 02:47:35 rename sys/signal.h to signal.h; configure m4 macro dir; this assist with compilation on Haiku svn:r1033
169321c9 2009-01-13 20:26:37 Rename four internal headers to follow the -internal.h convention. svn:r1000
87be18da 2008-12-25 16:25:37 implement evdns_cancel_request; test one of the new evdns_base functions svn:r980
dd731685 2008-12-03 20:09:13 Implement increased DSN-poisoning resistance via the 0x20 hack. svn:r958
4e8a339e 2008-05-05 15:46:00 r19602@catbus: nickm | 2008-05-05 11:45:18 -0400 Make most of the tests use the new headers. svn:r776
ce4ee418 2007-11-26 19:18:49 r16733@catbus: nickm | 2007-11-26 14:18:25 -0500 Add an --enable-gcc-warnings option (lifted from Tor) to the configure script. When provided, and when we are using GCC, we enable a bunch of extra GCC warnings in the compiler. Also, make the code all build happily with these warnings. svn:r553
bab0e6d4 2007-11-07 04:28:54 r16492@catbus: nickm | 2007-11-06 23:27:32 -0500 Fix unit tests so that an outdated nameserver means "Skip IPv6 tests", not "Abort." svn:r487
7c507668 2007-11-07 03:52:20 r16489@catbus: nickm | 2007-11-06 22:51:05 -0500 Do not use "class" as identifier in evdns.h; but use a backward-compatible fix. (Should fix bug 1826515, originally reported by Roger Clark) svn:r486
1e1f77c5 2007-09-20 19:08:20 Make the test/ subdirectory buildable under Windows. Well, mingw at least. The tests still don't all pass, but at least now we know that. svn:r447
35983cd6 2007-08-16 21:12:53 r14618@catbus: nickm | 2007-08-16 17:11:47 -0400 In ANSI C, int func() is a function with unspecified arguments, whereas int func(void) is a function that takes no arguments. Using int func() to mean a function with no arguments is a C++ism, so let's not use or generate it. svn:r395
7c6df310 2007-07-30 23:53:10 remove c++ comments from Jan Kneschke svn:r373
b5d2f9a2 2007-03-01 06:25:18 rolling back r339: evconfig.h does not work svn:r341
127c260b 2007-02-28 04:02:29 make evconfig.h available as installed header file; not really ideal but good enough for me; from Nick Mathewson svn:r339
faf5f73a 2007-02-08 16:39:15 dns server support from Nick Mathewson; tiny tweaks to the regression test from me to make it run on systems where stack variables get initialized with trash. svn:r321
121efe65 2007-01-27 08:38:51 small bug fixes to AAAA resolution and regression test; from Nick Mathewson! we love regresson tests. svn:r319
cf47f86b 2006-10-09 00:48:42 put the evdns documentation into the header file. pathetic start of evdns manpage. a little bit more testing and debug output for the DNS regression test. add a BSD copyright to evdns.h with appropriate explanations. svn:r239
fe1dfe0f 2006-10-05 22:59:44 sync evdns changes with tor - from Nick Mathewson svn:r238
e9c1e3f7 2006-08-28 00:57:49 introduce evdns_init() which works on windows and unix. svn:r231
07c3fb50 2006-08-27 20:04:20 add a simple regression test for the DNS resolver; requires internet access. do some KNF on evdns.c; add checks to prevent potential buffer overflows. fix one memory leak. svn:r230