diff --git a/Knot.files b/Knot.files index 742fcd0d154c4f256b3caf13a779f4c33f985b26..938722385d19da2e4675f521d0e2e16b86174ef0 100644 --- a/Knot.files +++ b/Knot.files @@ -537,17 +537,12 @@ src/zscanner/tests/processing.h src/zscanner/tests/tests.c src/zscanner/tests/tests.h src/zscanner/tests/zscanner-tool.c +tests-fuzz/afl-loop.h tests-fuzz/packet.c tests-fuzz/packet_libfuzzer.c tests-fuzz/wrap/server.c tests-fuzz/wrap/tcp-handler.c tests-fuzz/wrap/udp-handler.c -tests/acl.c -tests/changeset.c -tests/conf.c -tests/conf_tools.c -tests/confdb.c -tests/confio.c tests/contrib/test_base32hex.c tests/contrib/test_base64.c tests/contrib/test_endian.c @@ -561,10 +556,6 @@ tests/contrib/test_string.c tests/contrib/test_strtonum.c tests/contrib/test_wire.c tests/contrib/test_wire_ctx.c -tests/dthreads.c -tests/fake_server.h -tests/fdset.c -tests/journal_lmdb.c tests/libknot/test_control.c tests/libknot/test_cookies-client.c tests/libknot/test_cookies-opt.c @@ -584,22 +575,32 @@ tests/libknot/test_tsig.c tests/libknot/test_yparser.c tests/libknot/test_ypscheme.c tests/libknot/test_yptrafo.c -tests/modules/online_sign.c -tests/modules/rrl.c -tests/node.c -tests/process_answer.c -tests/process_query.c -tests/query_module.c -tests/requestor.c -tests/server.c +tests/modules/test_online_sign.c +tests/modules/test_rrl.c +tests/test_acl.c +tests/test_changeset.c +tests/test_conf.c tests/test_conf.h +tests/test_conf_tools.c +tests/test_confdb.c +tests/test_confio.c +tests/test_dthreads.c +tests/test_fdset.c +tests/test_journal.c +tests/test_node.c +tests/test_process_answer.c +tests/test_process_query.c +tests/test_query_module.c +tests/test_requestor.c +tests/test_server.c +tests/test_server.h +tests/test_worker_pool.c +tests/test_worker_queue.c +tests/test_zone-tree.c +tests/test_zone-update.c +tests/test_zone_events.c +tests/test_zone_serial.c +tests/test_zone_timers.c +tests/test_zonedb.c tests/utils/test_cert.c tests/utils/test_lookup.c -tests/worker_pool.c -tests/worker_queue.c -tests/zone_events.c -tests/zone_serial.c -tests/zone_timers.c -tests/zone_update.c -tests/zonedb.c -tests/ztree.c diff --git a/tests/.gitignore b/tests/.gitignore index 8f24fe1cf422244fef51cdcad8d0b2aec61991f5..adef42ed0f3fc2d910a2251fc5a6850e608fac93 100644 --- a/tests/.gitignore +++ b/tests/.gitignore @@ -36,31 +36,33 @@ /libknot/test_ypscheme /libknot/test_yptrafo -/acl -/changeset -/conf -/conf_tools -/confdb -/confio -/dthreads -/fdset -/journal_lmdb -/modules/online_sign -/modules/rrl -/node -/process_answer -/process_query -/query_module -/requestor -/semantic_check -/server +/modules/test_online_sign +/modules/test_rrl + /utils/test_cert /utils/test_lookup -/worker_pool -/worker_queue -/zone_events -/zone_serial -/zone_timers -/zone_update -/zonedb -/ztree + +/test_acl +/test_changeset +/test_conf +/test_conf_tools +/test_confdb +/test_confio +/test_dthreads +/test_fdset +/test_journal +/test_node +/test_process_answer +/test_process_query +/test_query_module +/test_requestor +/test_semantic_check +/test_server +/test_worker_pool +/test_worker_queue +/test_zone-tree +/test_zone-update +/test_zone_events +/test_zone_serial +/test_zone_timers +/test_zonedb diff --git a/tests/Makefile.am b/tests/Makefile.am index b7e93ff80820a63d3bff64b6043fb1a1d469c0d3..96c3d6800d2e8350463a5b5901a815268bba4fdf 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -48,33 +48,37 @@ check_PROGRAMS += \ libknot/test_yptrafo check_PROGRAMS += \ - modules/online_sign \ - modules/rrl \ + modules/test_online_sign \ + modules/test_rrl + +check_PROGRAMS += \ utils/test_cert \ - utils/test_lookup \ - acl \ - changeset \ - conf \ - conf_tools \ - confdb \ - confio \ - dthreads \ - fdset \ - journal_lmdb \ - node \ - process_answer \ - process_query \ - query_module \ - requestor \ - server \ - worker_pool \ - worker_queue \ - zone_events \ - zone_serial \ - zone_timers \ - zone_update \ - zonedb \ - ztree + utils/test_lookup + +check_PROGRAMS += \ + test_acl \ + test_changeset \ + test_conf \ + test_conf_tools \ + test_confdb \ + test_confio \ + test_dthreads \ + test_fdset \ + test_journal \ + test_node \ + test_process_answer \ + test_process_query \ + test_query_module \ + test_requestor \ + test_server \ + test_worker_pool \ + test_worker_queue \ + test_zone-tree \ + test_zone-update \ + test_zone_events \ + test_zone_serial \ + test_zone_timers \ + test_zonedb utils_test_lookup_CPPFLAGS = \ $(AM_CPPFLAGS) \ @@ -107,9 +111,9 @@ check-local: $(check_PROGRAMS) $(check_SCRIPTS) -L $(top_builddir)/tests/runtests.log \ $(check_PROGRAMS) $(check_SCRIPTS) -acl_SOURCES = acl.c test_conf.h -conf_SOURCES = conf.c test_conf.h -confdb_SOURCES = confdb.c test_conf.h -confio_SOURCES = confio.c test_conf.h -process_query_SOURCES = process_query.c fake_server.h test_conf.h -process_answer_SOURCES = process_answer.c fake_server.h test_conf.h +test_acl_SOURCES = test_acl.c test_conf.h +test_conf_SOURCES = test_conf.c test_conf.h +test_confdb_SOURCES = test_confdb.c test_conf.h +test_confio_SOURCES = test_confio.c test_conf.h +test_process_query_SOURCES = test_process_query.c test_server.h test_conf.h +test_process_answer_SOURCES = test_process_answer.c test_server.h test_conf.h diff --git a/tests/TODO b/tests/TODO deleted file mode 100644 index bf03e7c3caa3328aea0c8d542b9fb002697bd011..0000000000000000000000000000000000000000 --- a/tests/TODO +++ /dev/null @@ -1 +0,0 @@ -- reimplement lives_ok diff --git a/tests/modules/online_sign.c b/tests/modules/test_online_sign.c similarity index 100% rename from tests/modules/online_sign.c rename to tests/modules/test_online_sign.c diff --git a/tests/modules/rrl.c b/tests/modules/test_rrl.c similarity index 100% rename from tests/modules/rrl.c rename to tests/modules/test_rrl.c diff --git a/tests/semantic_check_data/Makefile.inc b/tests/semantic_check_data/Makefile.inc index 2953ff3d5e787e3bc2f375085779368df422ea0e..6e28f651f1d719373e1add872359b433e32d0e19 100644 --- a/tests/semantic_check_data/Makefile.inc +++ b/tests/semantic_check_data/Makefile.inc @@ -1,5 +1,5 @@ check_SCRIPTS = \ - semantic_check + test_semantic_check CLEANFILES += $(check_SCRIPTS) @@ -7,10 +7,10 @@ edit = $(SED) \ -e 's|@top_srcdir[@]|$(abs_top_srcdir)|g' \ -e 's|@top_builddir[@]|$(abs_top_builddir)|g' -semantic_check: $(top_srcdir)/tests/semantic_check.in - $(edit) < $(top_srcdir)/tests/semantic_check.in > $(top_builddir)/tests/semantic_check - chmod +x $(top_builddir)/tests/semantic_check +test_semantic_check: $(top_srcdir)/tests/test_semantic_check.in + $(edit) < $(top_srcdir)/tests/test_semantic_check.in > $(top_builddir)/tests/test_semantic_check + chmod +x $(top_builddir)/tests/test_semantic_check EXTRA_DIST = \ - semantic_check.in \ + test_semantic_check.in \ semantic_check_data diff --git a/tests/acl.c b/tests/test_acl.c similarity index 100% rename from tests/acl.c rename to tests/test_acl.c diff --git a/tests/changeset.c b/tests/test_changeset.c similarity index 100% rename from tests/changeset.c rename to tests/test_changeset.c diff --git a/tests/conf.c b/tests/test_conf.c similarity index 100% rename from tests/conf.c rename to tests/test_conf.c diff --git a/tests/conf_tools.c b/tests/test_conf_tools.c similarity index 100% rename from tests/conf_tools.c rename to tests/test_conf_tools.c diff --git a/tests/confdb.c b/tests/test_confdb.c similarity index 100% rename from tests/confdb.c rename to tests/test_confdb.c diff --git a/tests/confio.c b/tests/test_confio.c similarity index 100% rename from tests/confio.c rename to tests/test_confio.c diff --git a/tests/dthreads.c b/tests/test_dthreads.c similarity index 100% rename from tests/dthreads.c rename to tests/test_dthreads.c diff --git a/tests/fdset.c b/tests/test_fdset.c similarity index 100% rename from tests/fdset.c rename to tests/test_fdset.c diff --git a/tests/journal_lmdb.c b/tests/test_journal.c similarity index 100% rename from tests/journal_lmdb.c rename to tests/test_journal.c diff --git a/tests/node.c b/tests/test_node.c similarity index 100% rename from tests/node.c rename to tests/test_node.c diff --git a/tests/process_answer.c b/tests/test_process_answer.c similarity index 98% rename from tests/process_answer.c rename to tests/test_process_answer.c index e8416c9cbdc256e45112895cf06bde6c205dbab4..28938238deb07ea5f17d0714c9b6ed51debf26fd 100644 --- a/tests/process_answer.c +++ b/tests/test_process_answer.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2013 CZ.NIC, z.s.p.o. <knot-dns@labs.nic.cz> +/* Copyright (C) 2017 CZ.NIC, z.s.p.o. <knot-dns@labs.nic.cz> This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -22,7 +22,7 @@ #include "libknot/descriptor.h" #include "libknot/packet/wire.h" #include "knot/query/query.h" -#include "fake_server.h" +#include "test_server.h" #include "contrib/ucw/mempool.h" /* @note Test helpers. */ diff --git a/tests/process_query.c b/tests/test_process_query.c similarity index 98% rename from tests/process_query.c rename to tests/test_process_query.c index 99dfe78382e90c4b870625561e1ee20fff4fb3c3..ed3489d46a06ebf65c7442c1836a717236ca893b 100644 --- a/tests/process_query.c +++ b/tests/test_process_query.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2013 CZ.NIC, z.s.p.o. <knot-dns@labs.nic.cz> +/* Copyright (C) 2017 CZ.NIC, z.s.p.o. <knot-dns@labs.nic.cz> This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -22,7 +22,7 @@ #include "libknot/descriptor.h" #include "libknot/packet/wire.h" #include "knot/nameserver/process_query.h" -#include "fake_server.h" +#include "test_server.h" #include "contrib/ucw/mempool.h" /* Basic response check (4 TAP tests). */ diff --git a/tests/query_module.c b/tests/test_query_module.c similarity index 100% rename from tests/query_module.c rename to tests/test_query_module.c diff --git a/tests/requestor.c b/tests/test_requestor.c similarity index 100% rename from tests/requestor.c rename to tests/test_requestor.c diff --git a/tests/semantic_check.in b/tests/test_semantic_check.in similarity index 100% rename from tests/semantic_check.in rename to tests/test_semantic_check.in diff --git a/tests/server.c b/tests/test_server.c similarity index 100% rename from tests/server.c rename to tests/test_server.c diff --git a/tests/fake_server.h b/tests/test_server.h similarity index 100% rename from tests/fake_server.h rename to tests/test_server.h diff --git a/tests/worker_pool.c b/tests/test_worker_pool.c similarity index 100% rename from tests/worker_pool.c rename to tests/test_worker_pool.c diff --git a/tests/worker_queue.c b/tests/test_worker_queue.c similarity index 100% rename from tests/worker_queue.c rename to tests/test_worker_queue.c diff --git a/tests/ztree.c b/tests/test_zone-tree.c similarity index 100% rename from tests/ztree.c rename to tests/test_zone-tree.c diff --git a/tests/zone_update.c b/tests/test_zone-update.c similarity index 100% rename from tests/zone_update.c rename to tests/test_zone-update.c diff --git a/tests/zone_events.c b/tests/test_zone_events.c similarity index 100% rename from tests/zone_events.c rename to tests/test_zone_events.c diff --git a/tests/zone_serial.c b/tests/test_zone_serial.c similarity index 100% rename from tests/zone_serial.c rename to tests/test_zone_serial.c diff --git a/tests/zone_timers.c b/tests/test_zone_timers.c similarity index 100% rename from tests/zone_timers.c rename to tests/test_zone_timers.c diff --git a/tests/zonedb.c b/tests/test_zonedb.c similarity index 100% rename from tests/zonedb.c rename to tests/test_zonedb.c