summaryrefslogtreecommitdiff
path: root/tests/test_dns.c
AgeCommit message (Collapse)Author
2016-12-08tests_dns: Make DNS tests older nameser.h compatiblesnuffy
Fix the tests for DNS to use older style nameser.h as in ASTERISK-26608. Tested on: OpenBSD 6.0, Debian 8 ASTERISK-26647 #close Change-Id: I285913c44202537c04b3ed09c015efa6e5f9052d
2015-08-10Merge "Replaces clock_gettime() with ast_tsnow()"Joshua Colp
2015-08-07Replaces clock_gettime() with ast_tsnow()David M. Lee
clock_gettime() is, unfortunately, not portable. But I did like that over our usual `ts.tv_nsec = tv.tv_usec * 1000` copy/paste code we usually do when we want a timespec and all we have is ast_tvnow(). This patch adds ast_tsnow(), which mimics ast_tvnow(), but returns a timespec. If clock_gettime() is available, it will use that. Otherwise ast_tsnow() falls back to using ast_tvnow(). Change-Id: Ibb1ee67ccf4826b9b76d5a5eb62e90b29b6c456e
2015-07-31dns_core: Allow zero-length DNS responses.Mark Michelson
A testsuite test recently failed due to a crash that occurred in the DNS core. The problem was that the test could not resolve an address, did not set a result on the DNS query, and then indicated the query was completed. The DNS core does not handle the case of a query with no result gracefully, and so there is a crash. This changeset makes the DNS system resolver set a result with a zero-length answer in the case that a DNS resolution failure occurs early. The DNS core now also will accept such a response without treating it as invalid input. A unit test was updated to no longer treat setting a zero-length response as off-nominal. Change-Id: Ie56641e22debdaa61459e1c9a042e23b78affbf6
2015-06-24DNS unit tests: Fix extraneous description string commas.Richard Mudgett
Change-Id: Icf5f13c8e1c2c92a4473bb573ed2dd856ce1b64e
2015-06-10DNS: Remove trailing newline from summary and descriptions.Richard Mudgett
Those trailing newlines mess up test formatting. Change-Id: I5e3f3a55b82c9d7acb9661201d4993d1958f1185
2015-03-25dns: Add core DNS API + unit tests and res_resolver_unbound module + unit tests.Joshua Colp
This change adds an abstracted core DNS API which resembles the API described here[1]. The API provides a pluggable mechanism for resolvers and also a consistent view for records. Both synchronous and asynchronous queries are supported. This change also adds a res_resolver_unbound module which uses the libunbound library to provide resolution. Unit tests have also been written for all of the above to confirm the API and functionality. ASTERISK-24834 #close Reported by: Matt Jordan ASTERISK-24836 #close Reported by: Matt Jordan Review: https://reviewboard.asterisk.org/r/4474/ Review: https://reviewboard.asterisk.org/r/4512/ [1] https://wiki.asterisk.org/wiki/display/AST/Asterisk+DNS+API git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@433370 65c4cc65-6c06-0410-ace0-fbb531ad65f3