getdns/src/test
Willem Toorop ef455471f4 Work around dnsmasq issue 2020-03-04 10:57:11 +00:00
..
tpkg Stub only links with GNUTLS 2020-03-02 15:12:33 +01:00
README Write libcheck logfiles via env variables 2016-03-17 16:40:30 +01:00
check_getdns.c Clang pragma's with clang only 2017-03-25 20:22:34 -05:00
check_getdns_address.h Missed one SOA that is not returned 2019-11-28 16:42:42 +00:00
check_getdns_address_sync.h Fix unit tests (for changed world) 2020-02-12 12:28:50 +01:00
check_getdns_cancel_callback.h Fix pedantic warnings in unit tests 2016-12-08 22:33:10 +01:00
check_getdns_common.c Work around dnsmasq issue 2020-03-04 10:57:11 +00:00
check_getdns_common.h Something wrong with /etc/hosts? 2018-12-13 15:24:37 +01:00
check_getdns_context_create.h adding more get functions to the tests 2017-05-10 16:47:51 +02:00
check_getdns_context_destroy.h Fix pedantic warnings in unit tests 2016-12-08 22:33:10 +01:00
check_getdns_context_set_context_update_callback.h adding more get functions to the tests 2017-05-10 16:47:51 +02:00
check_getdns_context_set_dns_transport.h Make check timeout larger than getdns timeout 2019-12-19 10:44:22 +00:00
check_getdns_context_set_timeout.c Merge remote-tracking branch 'origin/develop' into coverage 2017-05-22 09:48:18 +02:00
check_getdns_context_set_timeout.h Clang pragma's with clang only 2017-03-25 20:22:34 -05:00
check_getdns_context_set_upstream_recursive_servers.h More update to README 2019-11-18 20:41:28 +00:00
check_getdns_convert_alabel_to_ulabel.h Fill in <organization> place holder. 2014-02-25 14:23:19 +01:00
check_getdns_convert_ulabel_to_alabel.h Fill in <organization> place holder. 2014-02-25 14:23:19 +01:00
check_getdns_dict_destroy.h Fix signal.h include. 2014-03-12 21:32:18 -04:00
check_getdns_dict_get_bindata.h Fill in <organization> place holder. 2014-02-25 14:23:19 +01:00
check_getdns_dict_get_data_type.h Fill in <organization> place holder. 2014-02-25 14:23:19 +01:00
check_getdns_dict_get_dict.h Fill in <organization> place holder. 2014-02-25 14:23:19 +01:00
check_getdns_dict_get_int.h Fill in <organization> place holder. 2014-02-25 14:23:19 +01:00
check_getdns_dict_get_list.h Fill in <organization> place holder. 2014-02-25 14:23:19 +01:00
check_getdns_dict_get_names.h Unit test fixes for CFLAGS=-Wextra 2016-12-08 14:39:38 +01:00
check_getdns_dict_set_bindata.h Fill in <organization> place holder. 2014-02-25 14:23:19 +01:00
check_getdns_dict_set_dict.h Fill in <organization> place holder. 2014-02-25 14:23:19 +01:00
check_getdns_dict_set_int.h Fill in <organization> place holder. 2014-02-25 14:23:19 +01:00
check_getdns_dict_set_list.h Fill in <organization> place holder. 2014-02-25 14:23:19 +01:00
check_getdns_display_ip_address.h Fill in <organization> place holder. 2014-02-25 14:23:19 +01:00
check_getdns_eventloop.h Make just the src/getdns files part of doxygen by default. 2016-07-01 17:53:45 +01:00
check_getdns_general.h Fix unit tests (for changed world) 2020-02-12 12:28:50 +01:00
check_getdns_general_sync.h Fix unit tests (for changed world) 2020-02-12 12:28:50 +01:00
check_getdns_hostname.h NLnet Labs reversed space takes long to lookup... 2019-12-16 11:04:49 +01:00
check_getdns_hostname_sync.h NLnet Labs reversed space takes long to lookup... 2019-12-16 11:04:49 +01:00
check_getdns_libev.c Clang pragma's with clang only 2017-03-25 20:22:34 -05:00
check_getdns_libevent.c Clang pragma's with clang only 2017-03-25 20:22:34 -05:00
check_getdns_libevent.h Define u_char if including event.h for libevent1 2014-02-25 14:21:44 -05:00
check_getdns_libuv.c Clang pragma's with clang only 2017-03-25 20:22:34 -05:00
check_getdns_list_get_bindata.h Fill in <organization> place holder. 2014-02-25 14:23:19 +01:00
check_getdns_list_get_data_type.h Fill in <organization> place holder. 2014-02-25 14:23:19 +01:00
check_getdns_list_get_dict.h Fill in <organization> place holder. 2014-02-25 14:23:19 +01:00
check_getdns_list_get_int.h Fill in <organization> place holder. 2014-02-25 14:23:19 +01:00
check_getdns_list_get_length.h Fill in <organization> place holder. 2014-02-25 14:23:19 +01:00
check_getdns_list_get_list.h Fill in <organization> place holder. 2014-02-25 14:23:19 +01:00
check_getdns_pretty_print_dict.h add get functions to check the values 2017-05-08 12:49:59 +02:00
check_getdns_selectloop.c Unit test fixes for CFLAGS=-Wextra 2016-12-08 14:39:38 +01:00
check_getdns_service.h Work around issue in cmake (after 3.5 but fixed in 3.12) where object libraries could not be used with target_link_library(). 2019-11-28 16:22:45 +00:00
check_getdns_service_sync.h Work around issue in cmake (after 3.5 but fixed in 3.12) where object libraries could not be used with target_link_library(). 2019-11-28 16:22:45 +00:00
check_getdns_transport.c s/recieve/receive/ 2017-06-09 11:24:51 +02:00
check_getdns_transport.h Clang pragma's with clang only 2017-03-25 20:22:34 -05:00
scratchpad.template.c Bugfixes for setting with json pointers 2015-10-08 12:54:30 +02:00
testmessages.c Static checking fixes 2016-04-29 12:00:17 +02:00
testmessages.h Fill in <organization> place holder. 2014-02-25 14:23:19 +01:00
tests_dict.c Unit test fixes for CFLAGS=-Wextra 2016-12-08 14:39:38 +01:00
tests_dict.good update testscript, check_dns is much better than diff. 2014-02-04 11:35:28 +01:00
tests_list.c Unit test fixes for CFLAGS=-Wextra 2016-12-08 14:39:38 +01:00
tests_list.good update testscript, check_dns is much better than diff. 2014-02-04 11:35:28 +01:00
tests_namespaces.c No executable flags on source files 2015-01-20 12:16:49 +01:00
tests_namespaces.good rm spurious execute bits +unit test to detect them 2015-05-26 14:16:27 +02:00
tests_stub_async.c Final for loop initializations elimination 2017-09-01 16:50:31 +02:00
tests_stub_async.good Crude changes to stub test scripts to allow testing of all transport and recusive mode combinations 2014-10-22 17:09:33 +00:00
tests_stub_sync.c Synchronize with October 2015 spec 2015-10-22 12:02:04 +02:00
tests_stub_sync.good Crude changes to stub test scripts to allow testing of all transport and recusive mode combinations 2014-10-22 17:09:33 +00:00
tests_transports.sh Use -V option in transport tests 2017-07-06 12:19:14 +02:00
testscript.sh Fill in <organization> place holder. 2014-02-25 14:23:19 +01:00

README

The programs in this directory are intended to provide a regression
test suite - we should be adding tests here as we build the package.

When building unit tests one approach that makes regression testing
easy is to generate canonical output and maintain that with the
code.  Changes to the code should produce output that matches the
canonical output, if it doesn't then the developer needs to look at
the differences to determine whether something broke or is fixed.  Once
the new output is verified it can replace the canonical output.

A typical flow might be illustrated via tests_list:
    - build tests_list (an executable linked against the library)
    - run the regression tests
        ./tests_list > tests_list.out
    - compare output to canonical output
        diff tests_list.out tests_list.can > tests_list.res
    - if there are any diffs then a change affected the output
    - verify the new output and copy it to tests_list.can
    - commit the new canonical output to the repository

Some of the tests that remain to be implemented:
- memory leak testing integrated into the test progs

libcheck facilitates selectively debugging of specific cases.
Example usage:
$ CK_LOG_FILE_NAME="/dev/stderr" CK_FORK=no \
    CK_RUN_SUITE="getdns_context_set_timeout()" CK_RUN_CASE="Positive" \
    ../../libtool exe gdb --args ./check_getdns