summaryrefslogtreecommitdiff
path: root/regress
Commit message (Collapse)AuthorAge
* Licensing: Add copyright for Mark WoodingIan Jackson2014-10-20
| | | | Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* Licensing: Update copyright dates for Ian JacksonIan Jackson2014-10-20
| | | | Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* Licensing: Delete FSF street addressIan Jackson2014-10-20
| | | | Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* Licensing: Update version in file header commentsIan Jackson2014-10-19
| | | | Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* regress/: Replace PF_ with AF_Ian Jackson2014-10-19
| | | | | | | | | | | I don't much like PF_. None of the modern specs or docs talk about PF any more. Entirely formulaic patch: perl -i~ -pe 's/\bPF_INET\b/AF_INET/g' regress/* perl -i~ -pe 's/\bPF_INET6\b/AF_INET6/g' regress/* Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* regress/Makefile.in: Declare <client>_c.o as .SECONDARYIan Jackson2014-10-19
| | | | | | | | | | | | | Otherwise you can get this: regress$ make adnstest_record -j2 gcc -g -O2 -Wall -Wmissing-prototypes -Wwrite-strings -Wstrict-prototypes -Wcast-qual -Wpointer-arith -Wno-pointer-sign -I../src -I. -I./../src -DADNS_REGRESS_TEST -I. -c -g -o addrfam_d.o ../src/addrfam.c gcc adnstest_c.o hrecord.o hcommon.o types_d.o event_d.o query_d.o reply_d.o general_d.o setup_d.o transmit_d.o parse_d.o poll_d.o check_d.o addrfam_d.o -o adnstest_record gcc: error: adnstest_c.o: No such file or directory make: *** [adnstest_record] Error 1 regress$ Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* reverse parsing: New test casesIan Jackson2014-10-19
| | | | | | | | Check that the reverse parser rejects labels with leading zeroes, with digits out of range, or with out-of-range label values. And check uppercase IPv6 PTRs. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* regress/gdbwrap: Provide a convenience scriptIan Jackson2014-10-19
| | | | | | | | | | This lets you run gdb from within r1test with appropriate fd plumbing. (It's a shame gdb doesn't have a way to simply tell it to take its commands from /dev/tty.) Add the suggested example gdb script file, x.gdb, to .gitignore. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* regress: New test bogus-sortlistIan Jackson2014-10-19
| | | | | | | Exercise the code which checks the sortlist for invalid address/mask pairs. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* Support IPv6 in addr queries.Mark Wooding2014-10-19
| | | | | | | | | | | | | | This is the end-game. Add flags and options to allow clients and administrators to choose which address families they want returned. For logical compatibility with old clients, don't return foreign address families unless explicitly requested. Lots of tests are modified to select only IPv4 addresses. There's nothing else up my sleeve. A new test is added for the additional functionality; more are expected later. Signed-off-by: Mark Wooding <mdw@distorted.org.uk> Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* Support v6-mapping IPv4 addresses found doing addr lookups.Mark Wooding2014-10-19
| | | | | | | | Not available if the client doesn't have the larger adns_rr_addr structure. Signed-off-by: Mark Wooding <mdw@distorted.org.uk> Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* src/types.c: Start on IPv6 support in adns_r_addr queries.Mark Wooding2014-10-19
| | | | | | | | | | | | | | | | | | | | The way addr queries work internally is now very different. The toplevel query is now `virtual', and exists to spawn subqueries for each applicable address type (currently hardcoded to A only, but this will change later). The toplevel query has a callback function which assembles its answer from the various child queries, and there's a collection of support machinery too. (Some of the bookkeeping done during this may seem unnecessary, but it will come in handy later.) Because more of the work is now done in internal query callbacks, some of the answers in the tests are reported in different order. See `Reentrancy: Avoid reentrant callbacks' for more detailed explanation of a similar change. Signed-off-by: Mark Wooding <mdw@distorted.org.uk> Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* Reentrancy: Avoid reentrant callbacksIan Jackson2014-10-19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Avoid making reentrant callbacks for internal queries during other processing. Currently there is a theoretical reentrancy bug in adns__submit_internal, if the internal query can itself be persuaded to fail immediately. The result would be a reentrant call to callback() for the child query inside functions like typei->parse. The possibility of such reentrancy is a bug waiting to happen - and indeed we are going to introduce more complicated query submissions which are more likely to fail immediately, turning this from a theoretical to a real bug. Solve this as follows: when an internal query completes, just put it on a list. Whenever we are on our way out of adns, we look through this list and make the callbacks (until the list is empty). This means that a fair amount of code needs to be taught that it might encounter queries in this callback pending state. We have to update some of the tests' expected output: Because adns now processes the callback later, a number of the parallel subqueries made by some of the tests end up finishing before being cancelled - and therefore the replies to those subqueries don't show up in the debug output as unrecognised. Also, in case-norecurse, the deferral of the callback causes the order of result reporting to be changed: the main query due to subqueries finishing (`PTR(checked)') ends up later on the results queue than the other queries dealt with in the same event loop iteration. (The actual answer packet to final query, `CNAME(-)', arrives later.) Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* src/: Support for transport over IPv6 (and other protocol families).Mark Wooding2014-10-19
| | | | | | | | | We create a UDP socket for each distinct protocol family during initialization, and then use the appropriate one for each server. The changes are somewhat invasive, but not really very complicated. Signed-off-by: Mark Wooding <mdw@distorted.org.uk> Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* regress/: Include the protocol family in socket(2) lines.Mark Wooding2014-10-19
| | | | | | | | | I updated the test files with this rune: grep -lZ "^ socket type=" *.sys | xargs -0r sed -i \ 's/^ socket type=/ socket domain=PF_INET type=/' Signed-off-by: Mark Wooding <mdw@distorted.org.uk>
* regress/: Use adns_addr2text/text2addr instead of inet_aton/ntoa.Mark Wooding2014-10-19
| | | | | | Makes the test harness agnostic regarding address families. Signed-off-by: Mark Wooding <mdw@distorted.org.uk>
* src/: Support IPv6 reverse queries.Mark Wooding2014-10-19
| | | | | | | | | | | | | | | | This involves moving most of the label parser in ckl_ptr, and the reverse-domain constructor, into addrfam and teaching them about IPv6. The label parser is a little tricky because it involves keeping track of a parse state for each possible address family until we run out of possibilities or the parse is complete. Moving the reverse-domain constructor introduces a slightly unpleasant hack: because knowledge of the right reverse-lookup zone belongs in addrfam, we get adns_submit_reverse to pass a sentinel through _reverse_any to addrfam. Signed-off-by: Mark Wooding <mdw@distorted.org.uk>
* src/, client/: Support for AAAA lookups.Mark Wooding2014-10-19
| | | | | | I've added a couple of simple test cases. Signed-off-by: Mark Wooding <mdw@distorted.org.uk>
* src/adns.h, src/types.c: Now adns_rr_addr can hold a sockaddr_in6.Mark Wooding2014-10-12
| | | | | | | | | | | | | | | | | | This uses the recently introduced variable-size record structure machinery so that only clients compiled against the new header file see the larger record structure. Note that we don't even try to actually do lookups for IPv6 addresses. That will come later on. This is just about sorting out the binary interface. Arrange that regress/case-brokenmail.sys asks for the correct record size, because otherwise the answers get printed out wrongly. [ I have done git-grep sizeof on a version of the head of this series and found no un-corrected uses of sizeof(adns_rr_addr) -iwj. ] Signed-off-by: Mark Wooding <mdw@distorted.org.uk>
* Bodge adns_r_addr query-id selection and fix regression tests to match.Mark Wooding2014-10-12
| | | | | | | | | | | | | | A future change is going to change how query-ids are allocated for adns_r_addr queries. So here we apply a simple bodge which will produce the same allocation pattern, but without the complexity of the rest of the change, and fix the test suite to match. I used the script regress/hack-query-ids to help me modify the case-*.sys files, though this was primarily a rather tedious manual process. Signed-off-by: Mark Wooding <mdw@distorted.org.uk> Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* src/, regress/: Prepare for early failures in PTR queries.Mark Wooding2014-10-12
| | | | | | | | | | | | | | | | | Soon we're going to change the way adns_r_ptr queries work: in particular, queries with names which can't be parsed back into addresses will be rejected during submission rather than waiting for the answer to the initial PTR question to come back. So here we apply a really simple temporary hack to adns_submit which approximately captures the behaviour we're after, and adjust the various test cases to match. We'll take this hack out when we make the proper change to the PTR handling. Hopefully this will persuade reviewers that there's nothing up my sleeves while I mess with the regression tests. Signed-off-by: Mark Wooding <mdw@distorted.org.uk>
* regress/r1test: Support an `ADNS_TEST_DEBUG' env var.Mark Wooding2014-10-12
| | | | | | | | | | | | | | | | | | | | Amazingly, sometimes the tests don't pass. When that happens, it's handy to be able to debug the library and find out why. It's a little tricky to attach GDB to the running process directly. I used the following: $ ADNS_TEST_DEBUG"noip gdbserver localhost:666" ./r1test CASE and then, in another terminal, something like $ noip gdb adnstest_s (gdb) target remote localhost:666 to debug the program. Signed-off-by: Mark Wooding <mdw@distorted.org.uk> Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* regress/: Don't track the size of the socket-address buffer in recvfrom(3).Mark Wooding2014-06-13
| | | | | | | This is system specific, and (more annoyingly) will break the tests if additional address families are supported in the future. Signed-off-by: Mark Wooding <mdw@distorted.org.uk>
* Remove unused variables.Mark Wooding2014-06-09
| | | | Signed-off-by: Mark Wooding <mdw@distorted.org.uk>
* Hacking to make out-of-tree builds work properly.Mark Wooding2014-06-09
| | | | | | | | This is mostly standard. The regression-test scripts have had an interface enhancement: they will look for source-like files using the $srcdir environment variable, which defaults to `.' for compatibility. Signed-off-by: Mark Wooding <mdw@distorted.org.uk>
* .gitignore: Add subdirectories' .cvsignoresIan Jackson2014-05-05
| | | | | | | egrep . */.cvsignore | perl -pe 's#/\.cvsignore:#/#' >>.gitignore git-rm */.cvsignore Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* update copyright datesian2006-04-08
|
* fix up adnstest for r_unknown; tests for r_unknownian2006-04-07
|
* regression tests for srv, part 2ian2006-04-06
|
* regression tests for srv, part 1ian2006-04-06
|
* srv with postsort seems to workian2006-04-06
|
* * adnstest converts some errno values to EFOOBAR: all of the onesian2006-04-03
| | | | | mentioned in adns.h, at least. This makes the regression test more portable (fixes problem noticed by Bernd Eckenfels).
* Do not print size of leaked blocks of memory (this causes a spuriousian2006-04-03
| | | | | regression test failure on some platforms).
* + * Call Tensurerecordfile in Hgettimeofday (Tensurerecordfile wasian2005-10-15
| | | | | | | | | | @@ -11,6 +11,11 @@ updated). + * Call Tensurerecordfile in Hgettimeofday (Tensurerecordfile was + Tensureinputfile/Tensureoutputfile). + * Add bind(2) and listen(2) to test harness (for epithet's benefit, but + harmless in adns). + * Add missing ENOTSOCK to hcommon.c.m4 (was already in hcommon.c!)
* + * Fix bogus multiple updates to p in transmit.c (!)ian2003-06-22
| | | | | | | | @@ -4,9 +4,12 @@ + * Fix bogus multiple updates to p in transmit.c (!) + * Fix up spurious #undef's in hredirect.h. (and there doesn't seem to be much explanation why). + * #include <stdlib.h> in internal.h (for abort etc).
* + * Do not spin if connect() fails immediately (!)ian2003-06-22
| | | | | | @@ -1,6 +1,7 @@ Bugfixes: + * Do not spin if connect() fails immediately (!)
* fix test cases for CNAME search list bugfixian2003-06-22
|
* + * Always #include <sys/types.h> before <sys/socket.h> (for FreeBSD 4.6).ian2002-11-24
| | | | | | @@ -6,6 +6,7 @@ (and there doesn't seem to be much explanation why). + * Always #include <sys/types.h> before <sys/socket.h> (for FreeBSD 4.6).
* Include standard CFLAGS in regress/ builds of other directories' files.ian2000-09-17
|
* Update copyright dates and documentation.ian2000-09-17
|
* Use `...` instead of POSIX $(...) to pander to stupid shells.ian2000-09-16
|
* Work around stupid sh versions which need 4<&4.ian2000-09-16
|
* Add <stdarg.h>.ian2000-09-16
|
* Do not run tests of executables not built. Do not buildian2000-09-16
| | | | | | adnsresfilter_record/playback. Add missing #include <sys/time.h>, <time.h>
* + * Add pre-generated versions of m4-generated files in regress/.ian2000-09-16
| | | | | @@ -22,6 +22,7 @@ + * Add pre-generated versions of m4-generated files in regress/.
* + * Regression tests now include adnshost, adnslogres, adnsresfilter.ian2000-09-16
| | | | | | | | | | | | @@ -9,7 +9,7 @@ * adnshost, adnslogres, adnsresfilter have options for config override. * adnsresfilter has --debug option. * Improvements to adnslogres (incl. new -c option) from Tony Finch. - * Regression tests now include `adnshost' invocations. + * Regression tests now include adnshost, adnslogres, adnsresfilter. * Test cancellation both before and after query completion. Portability fixes:
* Turn on debug for adnshost regression.ian2000-09-16
|
* New test case for cancel of a query with a subquery.ian2000-09-16
|
* Understand empty fd sets properly !ian2000-09-16
|
* Update copyright dates to 2000.ian2000-09-16
|