diff options
author | Daniel Salzman <daniel.salzman@nic.cz> | 2018-03-09 08:50:28 +0100 |
---|---|---|
committer | Daniel Salzman <daniel.salzman@nic.cz> | 2018-03-09 13:20:31 +0100 |
commit | 4a76305b378f912dfdd5f564e23a50210f6d7e09 (patch) | |
tree | e65525ab24fce9aaae96434f33af7bd128fd0f81 | |
parent | dnssec: remove obsolete doc (diff) | |
download | knot-4a76305b378f912dfdd5f564e23a50210f6d7e09.tar.xz knot-4a76305b378f912dfdd5f564e23a50210f6d7e09.zip |
tests: move zscanner tests and libtap + improvements
-rw-r--r-- | .gitignore | 8 | ||||
-rw-r--r-- | Knot.files | 24 | ||||
-rw-r--r-- | Knot.includes | 3 | ||||
-rw-r--r-- | Makefile.am | 5 | ||||
-rw-r--r-- | configure.ac | 2 | ||||
-rwxr-xr-x | scripts/update-project-files.py | 5 | ||||
-rw-r--r-- | src/Makefile.am | 5 | ||||
-rw-r--r-- | src/zscanner/Makefile.am | 2 | ||||
-rw-r--r-- | src/zscanner/tests/.gitignore | 1 | ||||
-rw-r--r-- | src/zscanner/tests/Makefile.inc | 45 | ||||
-rw-r--r-- | src/zscanner/tests/tests.c | 79 | ||||
-rw-r--r-- | src/zscanner/tests/tests.h | 29 | ||||
-rw-r--r-- | tests/.gitignore | 4 | ||||
-rw-r--r-- | tests/Makefile.am | 56 | ||||
-rw-r--r-- | tests/_libtap/.gitignore (renamed from libtap/.gitignore) | 0 | ||||
-rw-r--r-- | tests/_libtap/Makefile.am (renamed from libtap/Makefile.am) | 9 | ||||
-rw-r--r-- | tests/_libtap/README (renamed from libtap/README) | 0 | ||||
-rw-r--r-- | tests/_libtap/runtests.c (renamed from libtap/runtests.c) | 0 | ||||
-rw-r--r-- | tests/_libtap/tap/basic.c (renamed from libtap/tap/basic.c) | 0 | ||||
-rw-r--r-- | tests/_libtap/tap/basic.h (renamed from libtap/tap/basic.h) | 0 | ||||
-rw-r--r-- | tests/_libtap/tap/files.c (renamed from libtap/tap/files.c) | 0 | ||||
-rw-r--r-- | tests/_libtap/tap/files.h (renamed from libtap/tap/files.h) | 0 | ||||
-rw-r--r-- | tests/_libtap/tap/float.c (renamed from libtap/tap/float.c) | 0 | ||||
-rw-r--r-- | tests/_libtap/tap/float.h (renamed from libtap/tap/float.h) | 0 | ||||
-rw-r--r-- | tests/_libtap/tap/libtap.sh (renamed from libtap/tap/libtap.sh) | 0 | ||||
-rw-r--r-- | tests/_libtap/tap/macros.h (renamed from libtap/tap/macros.h) | 0 | ||||
-rw-r--r-- | tests/knot/semantic_check_data/Makefile.inc | 16 | ||||
-rw-r--r-- | tests/knot/test_semantic_check.in | 2 | ||||
-rw-r--r-- | tests/zscanner/TESTS (renamed from src/zscanner/tests/TESTS) | 0 | ||||
-rw-r--r-- | tests/zscanner/data/00-0_general.in (renamed from src/zscanner/tests/data/00-0_general.in) | 0 | ||||
-rw-r--r-- | tests/zscanner/data/00-0_general.out (renamed from src/zscanner/tests/data/00-0_general.out) | 0 | ||||
-rw-r--r-- | tests/zscanner/data/00-1_general.in (renamed from src/zscanner/tests/data/00-1_general.in) | 0 | ||||
-rw-r--r-- | tests/zscanner/data/00-1_general.out (renamed from src/zscanner/tests/data/00-1_general.out) | 0 | ||||
-rw-r--r-- | tests/zscanner/data/00-2_general.in (renamed from src/zscanner/tests/data/00-2_general.in) | 0 | ||||
-rw-r--r-- | tests/zscanner/data/00-2_general.out (renamed from src/zscanner/tests/data/00-2_general.out) | 0 | ||||
-rw-r--r-- | tests/zscanner/data/00-3_general.in (renamed from src/zscanner/tests/data/00-3_general.in) | 0 | ||||
-rw-r--r-- | tests/zscanner/data/00-3_general.out (renamed from src/zscanner/tests/data/00-3_general.out) | 0 | ||||
-rw-r--r-- | tests/zscanner/data/00-4_general.in (renamed from src/zscanner/tests/data/00-4_general.in) | 0 | ||||
-rw-r--r-- | tests/zscanner/data/00-4_general.out (renamed from src/zscanner/tests/data/00-4_general.out) | 0 | ||||
-rw-r--r-- | tests/zscanner/data/01_owner.in (renamed from src/zscanner/tests/data/01_owner.in) | 0 | ||||
-rw-r--r-- | tests/zscanner/data/01_owner.out (renamed from src/zscanner/tests/data/01_owner.out) | 0 | ||||
-rw-r--r-- | tests/zscanner/data/02_class.in (renamed from src/zscanner/tests/data/02_class.in) | 0 | ||||
-rw-r--r-- | tests/zscanner/data/02_class.out (renamed from src/zscanner/tests/data/02_class.out) | 0 | ||||
-rw-r--r-- | tests/zscanner/data/03_rrttl.in (renamed from src/zscanner/tests/data/03_rrttl.in) | 0 | ||||
-rw-r--r-- | tests/zscanner/data/03_rrttl.out (renamed from src/zscanner/tests/data/03_rrttl.out) | 0 | ||||
-rw-r--r-- | tests/zscanner/data/04-0_ORIGIN.in (renamed from src/zscanner/tests/data/04-0_ORIGIN.in) | 0 | ||||
-rw-r--r-- | tests/zscanner/data/04-0_ORIGIN.out (renamed from src/zscanner/tests/data/04-0_ORIGIN.out) | 0 | ||||
-rw-r--r-- | tests/zscanner/data/04-1_ORIGIN.in (renamed from src/zscanner/tests/data/04-1_ORIGIN.in) | 0 | ||||
-rw-r--r-- | tests/zscanner/data/04-1_ORIGIN.out (renamed from src/zscanner/tests/data/04-1_ORIGIN.out) | 0 | ||||
-rw-r--r-- | tests/zscanner/data/04-2_ORIGIN.in (renamed from src/zscanner/tests/data/04-2_ORIGIN.in) | 0 | ||||
-rw-r--r-- | tests/zscanner/data/04-2_ORIGIN.out (renamed from src/zscanner/tests/data/04-2_ORIGIN.out) | 0 | ||||
-rw-r--r-- | tests/zscanner/data/04-3_ORIGIN.in (renamed from src/zscanner/tests/data/04-3_ORIGIN.in) | 0 | ||||
-rw-r--r-- | tests/zscanner/data/04-3_ORIGIN.out (renamed from src/zscanner/tests/data/04-3_ORIGIN.out) | 0 | ||||
-rw-r--r-- | tests/zscanner/data/04-4_ORIGIN.in (renamed from src/zscanner/tests/data/04-4_ORIGIN.in) | 0 | ||||
-rw-r--r-- | tests/zscanner/data/04-4_ORIGIN.out (renamed from src/zscanner/tests/data/04-4_ORIGIN.out) | 0 | ||||
-rw-r--r-- | tests/zscanner/data/04-5_ORIGIN.in (renamed from src/zscanner/tests/data/04-5_ORIGIN.in) | 0 | ||||
-rw-r--r-- | tests/zscanner/data/04-5_ORIGIN.out (renamed from src/zscanner/tests/data/04-5_ORIGIN.out) | 0 | ||||
-rw-r--r-- | tests/zscanner/data/04-6_ORIGIN.in (renamed from src/zscanner/tests/data/04-6_ORIGIN.in) | 0 | ||||
-rw-r--r-- | tests/zscanner/data/04-6_ORIGIN.out (renamed from src/zscanner/tests/data/04-6_ORIGIN.out) | 0 | ||||
-rw-r--r-- | tests/zscanner/data/04-7_ORIGIN.in (renamed from src/zscanner/tests/data/04-7_ORIGIN.in) | 0 | ||||
-rw-r--r-- | tests/zscanner/data/04-7_ORIGIN.out (renamed from src/zscanner/tests/data/04-7_ORIGIN.out) | 0 | ||||
-rw-r--r-- | tests/zscanner/data/04-8_ORIGIN.in (renamed from src/zscanner/tests/data/04-8_ORIGIN.in) | 0 | ||||
-rw-r--r-- | tests/zscanner/data/04-8_ORIGIN.out (renamed from src/zscanner/tests/data/04-8_ORIGIN.out) | 0 | ||||
-rw-r--r-- | tests/zscanner/data/04-9_ORIGIN.in (renamed from src/zscanner/tests/data/04-9_ORIGIN.in) | 0 | ||||
-rw-r--r-- | tests/zscanner/data/04-9_ORIGIN.out (renamed from src/zscanner/tests/data/04-9_ORIGIN.out) | 0 | ||||
-rw-r--r-- | tests/zscanner/data/05-0_TTL.in (renamed from src/zscanner/tests/data/05-0_TTL.in) | 0 | ||||
-rw-r--r-- | tests/zscanner/data/05-0_TTL.out (renamed from src/zscanner/tests/data/05-0_TTL.out) | 0 | ||||
-rw-r--r-- | tests/zscanner/data/05-1_TTL.in (renamed from src/zscanner/tests/data/05-1_TTL.in) | 0 | ||||
-rw-r--r-- | tests/zscanner/data/05-1_TTL.out (renamed from src/zscanner/tests/data/05-1_TTL.out) | 0 | ||||
-rw-r--r-- | tests/zscanner/data/05-2_TTL.in (renamed from src/zscanner/tests/data/05-2_TTL.in) | 0 | ||||
-rw-r--r-- | tests/zscanner/data/05-2_TTL.out (renamed from src/zscanner/tests/data/05-2_TTL.out) | 0 | ||||
-rw-r--r-- | tests/zscanner/data/05-3_TTL.in (renamed from src/zscanner/tests/data/05-3_TTL.in) | 0 | ||||
-rw-r--r-- | tests/zscanner/data/05-3_TTL.out (renamed from src/zscanner/tests/data/05-3_TTL.out) | 0 | ||||
-rw-r--r-- | tests/zscanner/data/05-4_TTL.in (renamed from src/zscanner/tests/data/05-4_TTL.in) | 0 | ||||
-rw-r--r-- | tests/zscanner/data/05-4_TTL.out (renamed from src/zscanner/tests/data/05-4_TTL.out) | 0 | ||||
-rw-r--r-- | tests/zscanner/data/06-0_INCLUDE.in (renamed from src/zscanner/tests/data/06-0_INCLUDE.in) | 0 | ||||
-rw-r--r-- | tests/zscanner/data/06-0_INCLUDE.out (renamed from src/zscanner/tests/data/06-0_INCLUDE.out) | 0 | ||||
-rw-r--r-- | tests/zscanner/data/06-1_INCLUDE.in (renamed from src/zscanner/tests/data/06-1_INCLUDE.in) | 0 | ||||
-rw-r--r-- | tests/zscanner/data/06-1_INCLUDE.out (renamed from src/zscanner/tests/data/06-1_INCLUDE.out) | 0 | ||||
-rw-r--r-- | tests/zscanner/data/06-2_INCLUDE.in (renamed from src/zscanner/tests/data/06-2_INCLUDE.in) | 0 | ||||
-rw-r--r-- | tests/zscanner/data/06-2_INCLUDE.out (renamed from src/zscanner/tests/data/06-2_INCLUDE.out) | 0 | ||||
-rw-r--r-- | tests/zscanner/data/06-3_INCLUDE.in (renamed from src/zscanner/tests/data/06-3_INCLUDE.in) | 0 | ||||
-rw-r--r-- | tests/zscanner/data/06-3_INCLUDE.out (renamed from src/zscanner/tests/data/06-3_INCLUDE.out) | 0 | ||||
-rw-r--r-- | tests/zscanner/data/06-4_INCLUDE.in (renamed from src/zscanner/tests/data/06-4_INCLUDE.in) | 0 | ||||
-rw-r--r-- | tests/zscanner/data/06-4_INCLUDE.out (renamed from src/zscanner/tests/data/06-4_INCLUDE.out) | 0 | ||||
-rw-r--r-- | tests/zscanner/data/06-5_INCLUDE.in (renamed from src/zscanner/tests/data/06-5_INCLUDE.in) | 0 | ||||
-rw-r--r-- | tests/zscanner/data/06-5_INCLUDE.out (renamed from src/zscanner/tests/data/06-5_INCLUDE.out) | 0 | ||||
-rw-r--r-- | tests/zscanner/data/06-6_INCLUDE.in (renamed from src/zscanner/tests/data/06-6_INCLUDE.in) | 0 | ||||
-rw-r--r-- | tests/zscanner/data/06-6_INCLUDE.out (renamed from src/zscanner/tests/data/06-6_INCLUDE.out) | 0 | ||||
-rw-r--r-- | tests/zscanner/data/06-7_INCLUDE.in (renamed from src/zscanner/tests/data/06-7_INCLUDE.in) | 0 | ||||
-rw-r--r-- | tests/zscanner/data/06-7_INCLUDE.out (renamed from src/zscanner/tests/data/06-7_INCLUDE.out) | 0 | ||||
-rw-r--r-- | tests/zscanner/data/06-8_INCLUDE.in (renamed from src/zscanner/tests/data/06-8_INCLUDE.in) | 0 | ||||
-rw-r--r-- | tests/zscanner/data/06-8_INCLUDE.out (renamed from src/zscanner/tests/data/06-8_INCLUDE.out) | 0 | ||||
-rw-r--r-- | tests/zscanner/data/07-0-rdata.in (renamed from src/zscanner/tests/data/07-0-rdata.in) | 0 | ||||
-rw-r--r-- | tests/zscanner/data/07-0-rdata.out (renamed from src/zscanner/tests/data/07-0-rdata.out) | 0 | ||||
-rw-r--r-- | tests/zscanner/data/07-1-rdata.in (renamed from src/zscanner/tests/data/07-1-rdata.in) | 0 | ||||
-rw-r--r-- | tests/zscanner/data/07-1-rdata.out (renamed from src/zscanner/tests/data/07-1-rdata.out) | 0 | ||||
-rw-r--r-- | tests/zscanner/data/07-2-rdata.in (renamed from src/zscanner/tests/data/07-2-rdata.in) | 0 | ||||
-rw-r--r-- | tests/zscanner/data/07-2-rdata.out (renamed from src/zscanner/tests/data/07-2-rdata.out) | 0 | ||||
-rw-r--r-- | tests/zscanner/data/07-3-rdata.in (renamed from src/zscanner/tests/data/07-3-rdata.in) | 0 | ||||
-rw-r--r-- | tests/zscanner/data/07-3-rdata.out (renamed from src/zscanner/tests/data/07-3-rdata.out) | 0 | ||||
-rw-r--r-- | tests/zscanner/data/07-4-rdata.in (renamed from src/zscanner/tests/data/07-4-rdata.in) | 0 | ||||
-rw-r--r-- | tests/zscanner/data/07-4-rdata.out (renamed from src/zscanner/tests/data/07-4-rdata.out) | 0 | ||||
-rw-r--r-- | tests/zscanner/data/10_A.in (renamed from src/zscanner/tests/data/10_A.in) | 0 | ||||
-rw-r--r-- | tests/zscanner/data/10_A.out (renamed from src/zscanner/tests/data/10_A.out) | 0 | ||||
-rw-r--r-- | tests/zscanner/data/11_AAAA.in (renamed from src/zscanner/tests/data/11_AAAA.in) | 0 | ||||
-rw-r--r-- | tests/zscanner/data/11_AAAA.out (renamed from src/zscanner/tests/data/11_AAAA.out) | 0 | ||||
-rw-r--r-- | tests/zscanner/data/12_TXT.in (renamed from src/zscanner/tests/data/12_TXT.in) | 0 | ||||
-rw-r--r-- | tests/zscanner/data/12_TXT.out (renamed from src/zscanner/tests/data/12_TXT.out) | 0 | ||||
-rw-r--r-- | tests/zscanner/data/13_SPF.in (renamed from src/zscanner/tests/data/13_SPF.in) | 0 | ||||
-rw-r--r-- | tests/zscanner/data/13_SPF.out (renamed from src/zscanner/tests/data/13_SPF.out) | 0 | ||||
-rw-r--r-- | tests/zscanner/data/14_NS.in (renamed from src/zscanner/tests/data/14_NS.in) | 0 | ||||
-rw-r--r-- | tests/zscanner/data/14_NS.out (renamed from src/zscanner/tests/data/14_NS.out) | 0 | ||||
-rw-r--r-- | tests/zscanner/data/15_CNAME.in (renamed from src/zscanner/tests/data/15_CNAME.in) | 0 | ||||
-rw-r--r-- | tests/zscanner/data/15_CNAME.out (renamed from src/zscanner/tests/data/15_CNAME.out) | 0 | ||||
-rw-r--r-- | tests/zscanner/data/16_PTR.in (renamed from src/zscanner/tests/data/16_PTR.in) | 0 | ||||
-rw-r--r-- | tests/zscanner/data/16_PTR.out (renamed from src/zscanner/tests/data/16_PTR.out) | 0 | ||||
-rw-r--r-- | tests/zscanner/data/17_DNAME.in (renamed from src/zscanner/tests/data/17_DNAME.in) | 0 | ||||
-rw-r--r-- | tests/zscanner/data/17_DNAME.out (renamed from src/zscanner/tests/data/17_DNAME.out) | 0 | ||||
-rw-r--r-- | tests/zscanner/data/18_MX.in (renamed from src/zscanner/tests/data/18_MX.in) | 0 | ||||
-rw-r--r-- | tests/zscanner/data/18_MX.out (renamed from src/zscanner/tests/data/18_MX.out) | 0 | ||||
-rw-r--r-- | tests/zscanner/data/19_AFSDB.in (renamed from src/zscanner/tests/data/19_AFSDB.in) | 0 | ||||
-rw-r--r-- | tests/zscanner/data/19_AFSDB.out (renamed from src/zscanner/tests/data/19_AFSDB.out) | 0 | ||||
-rw-r--r-- | tests/zscanner/data/20_RT.in (renamed from src/zscanner/tests/data/20_RT.in) | 0 | ||||
-rw-r--r-- | tests/zscanner/data/20_RT.out (renamed from src/zscanner/tests/data/20_RT.out) | 0 | ||||
-rw-r--r-- | tests/zscanner/data/21_KX.in (renamed from src/zscanner/tests/data/21_KX.in) | 0 | ||||
-rw-r--r-- | tests/zscanner/data/21_KX.out (renamed from src/zscanner/tests/data/21_KX.out) | 0 | ||||
-rw-r--r-- | tests/zscanner/data/22_HINFO.in (renamed from src/zscanner/tests/data/22_HINFO.in) | 0 | ||||
-rw-r--r-- | tests/zscanner/data/22_HINFO.out (renamed from src/zscanner/tests/data/22_HINFO.out) | 0 | ||||
-rw-r--r-- | tests/zscanner/data/23_MINFO.in (renamed from src/zscanner/tests/data/23_MINFO.in) | 0 | ||||
-rw-r--r-- | tests/zscanner/data/23_MINFO.out (renamed from src/zscanner/tests/data/23_MINFO.out) | 0 | ||||
-rw-r--r-- | tests/zscanner/data/24_RP.in (renamed from src/zscanner/tests/data/24_RP.in) | 0 | ||||
-rw-r--r-- | tests/zscanner/data/24_RP.out (renamed from src/zscanner/tests/data/24_RP.out) | 0 | ||||
-rw-r--r-- | tests/zscanner/data/25_SOA.in (renamed from src/zscanner/tests/data/25_SOA.in) | 0 | ||||
-rw-r--r-- | tests/zscanner/data/25_SOA.out (renamed from src/zscanner/tests/data/25_SOA.out) | 0 | ||||
-rw-r--r-- | tests/zscanner/data/26_SRV.in (renamed from src/zscanner/tests/data/26_SRV.in) | 0 | ||||
-rw-r--r-- | tests/zscanner/data/26_SRV.out (renamed from src/zscanner/tests/data/26_SRV.out) | 0 | ||||
-rw-r--r-- | tests/zscanner/data/27_NAPTR.in (renamed from src/zscanner/tests/data/27_NAPTR.in) | 0 | ||||
-rw-r--r-- | tests/zscanner/data/27_NAPTR.out (renamed from src/zscanner/tests/data/27_NAPTR.out) | 0 | ||||
-rw-r--r-- | tests/zscanner/data/28_TYPE.in (renamed from src/zscanner/tests/data/28_TYPE.in) | 0 | ||||
-rw-r--r-- | tests/zscanner/data/28_TYPE.out (renamed from src/zscanner/tests/data/28_TYPE.out) | 0 | ||||
-rw-r--r-- | tests/zscanner/data/29_CERT.in (renamed from src/zscanner/tests/data/29_CERT.in) | 0 | ||||
-rw-r--r-- | tests/zscanner/data/29_CERT.out (renamed from src/zscanner/tests/data/29_CERT.out) | 0 | ||||
-rw-r--r-- | tests/zscanner/data/30_KEY.in (renamed from src/zscanner/tests/data/30_KEY.in) | 0 | ||||
-rw-r--r-- | tests/zscanner/data/30_KEY.out (renamed from src/zscanner/tests/data/30_KEY.out) | 0 | ||||
-rw-r--r-- | tests/zscanner/data/31_DNSKEY.in (renamed from src/zscanner/tests/data/31_DNSKEY.in) | 0 | ||||
-rw-r--r-- | tests/zscanner/data/31_DNSKEY.out (renamed from src/zscanner/tests/data/31_DNSKEY.out) | 0 | ||||
-rw-r--r-- | tests/zscanner/data/32_APL.in (renamed from src/zscanner/tests/data/32_APL.in) | 0 | ||||
-rw-r--r-- | tests/zscanner/data/32_APL.out (renamed from src/zscanner/tests/data/32_APL.out) | 0 | ||||
-rw-r--r-- | tests/zscanner/data/33_DS.in (renamed from src/zscanner/tests/data/33_DS.in) | 0 | ||||
-rw-r--r-- | tests/zscanner/data/33_DS.out (renamed from src/zscanner/tests/data/33_DS.out) | 0 | ||||
-rw-r--r-- | tests/zscanner/data/34_SSHFP.in (renamed from src/zscanner/tests/data/34_SSHFP.in) | 0 | ||||
-rw-r--r-- | tests/zscanner/data/34_SSHFP.out (renamed from src/zscanner/tests/data/34_SSHFP.out) | 0 | ||||
-rw-r--r-- | tests/zscanner/data/35_IPSECKEY.in (renamed from src/zscanner/tests/data/35_IPSECKEY.in) | 0 | ||||
-rw-r--r-- | tests/zscanner/data/35_IPSECKEY.out (renamed from src/zscanner/tests/data/35_IPSECKEY.out) | 0 | ||||
-rw-r--r-- | tests/zscanner/data/36_RRSIG.in (renamed from src/zscanner/tests/data/36_RRSIG.in) | 0 | ||||
-rw-r--r-- | tests/zscanner/data/36_RRSIG.out (renamed from src/zscanner/tests/data/36_RRSIG.out) | 0 | ||||
-rw-r--r-- | tests/zscanner/data/37_NSEC.in (renamed from src/zscanner/tests/data/37_NSEC.in) | 0 | ||||
-rw-r--r-- | tests/zscanner/data/37_NSEC.out (renamed from src/zscanner/tests/data/37_NSEC.out) | 0 | ||||
-rw-r--r-- | tests/zscanner/data/38_DHCID.in (renamed from src/zscanner/tests/data/38_DHCID.in) | 0 | ||||
-rw-r--r-- | tests/zscanner/data/38_DHCID.out (renamed from src/zscanner/tests/data/38_DHCID.out) | 0 | ||||
-rw-r--r-- | tests/zscanner/data/39_NSEC3.in (renamed from src/zscanner/tests/data/39_NSEC3.in) | 0 | ||||
-rw-r--r-- | tests/zscanner/data/39_NSEC3.out (renamed from src/zscanner/tests/data/39_NSEC3.out) | 0 | ||||
-rw-r--r-- | tests/zscanner/data/40_NSEC3PARAM.in (renamed from src/zscanner/tests/data/40_NSEC3PARAM.in) | 0 | ||||
-rw-r--r-- | tests/zscanner/data/40_NSEC3PARAM.out (renamed from src/zscanner/tests/data/40_NSEC3PARAM.out) | 0 | ||||
-rw-r--r-- | tests/zscanner/data/41_TLSA.in (renamed from src/zscanner/tests/data/41_TLSA.in) | 0 | ||||
-rw-r--r-- | tests/zscanner/data/41_TLSA.out (renamed from src/zscanner/tests/data/41_TLSA.out) | 0 | ||||
-rw-r--r-- | tests/zscanner/data/42_LOC.in (renamed from src/zscanner/tests/data/42_LOC.in) | 0 | ||||
-rw-r--r-- | tests/zscanner/data/42_LOC.out (renamed from src/zscanner/tests/data/42_LOC.out) | 0 | ||||
-rw-r--r-- | tests/zscanner/data/43_EUI48.in (renamed from src/zscanner/tests/data/43_EUI48.in) | 0 | ||||
-rw-r--r-- | tests/zscanner/data/43_EUI48.out (renamed from src/zscanner/tests/data/43_EUI48.out) | 0 | ||||
-rw-r--r-- | tests/zscanner/data/44_EUI64.in (renamed from src/zscanner/tests/data/44_EUI64.in) | 0 | ||||
-rw-r--r-- | tests/zscanner/data/44_EUI64.out (renamed from src/zscanner/tests/data/44_EUI64.out) | 0 | ||||
-rw-r--r-- | tests/zscanner/data/45_NID.in (renamed from src/zscanner/tests/data/45_NID.in) | 0 | ||||
-rw-r--r-- | tests/zscanner/data/45_NID.out (renamed from src/zscanner/tests/data/45_NID.out) | 0 | ||||
-rw-r--r-- | tests/zscanner/data/46_L32.in (renamed from src/zscanner/tests/data/46_L32.in) | 0 | ||||
-rw-r--r-- | tests/zscanner/data/46_L32.out (renamed from src/zscanner/tests/data/46_L32.out) | 0 | ||||
-rw-r--r-- | tests/zscanner/data/47_L64.in (renamed from src/zscanner/tests/data/47_L64.in) | 0 | ||||
-rw-r--r-- | tests/zscanner/data/47_L64.out (renamed from src/zscanner/tests/data/47_L64.out) | 0 | ||||
-rw-r--r-- | tests/zscanner/data/48_LP.in (renamed from src/zscanner/tests/data/48_LP.in) | 0 | ||||
-rw-r--r-- | tests/zscanner/data/48_LP.out (renamed from src/zscanner/tests/data/48_LP.out) | 0 | ||||
-rw-r--r-- | tests/zscanner/data/49_CDS.in (renamed from src/zscanner/tests/data/49_CDS.in) | 0 | ||||
-rw-r--r-- | tests/zscanner/data/49_CDS.out (renamed from src/zscanner/tests/data/49_CDS.out) | 0 | ||||
-rw-r--r-- | tests/zscanner/data/50_CDNSKEY.in (renamed from src/zscanner/tests/data/50_CDNSKEY.in) | 0 | ||||
-rw-r--r-- | tests/zscanner/data/50_CDNSKEY.out (renamed from src/zscanner/tests/data/50_CDNSKEY.out) | 0 | ||||
-rw-r--r-- | tests/zscanner/data/51_URI.in (renamed from src/zscanner/tests/data/51_URI.in) | 0 | ||||
-rw-r--r-- | tests/zscanner/data/51_URI.out (renamed from src/zscanner/tests/data/51_URI.out) | 0 | ||||
-rw-r--r-- | tests/zscanner/data/52_CAA.in (renamed from src/zscanner/tests/data/52_CAA.in) | 0 | ||||
-rw-r--r-- | tests/zscanner/data/52_CAA.out (renamed from src/zscanner/tests/data/52_CAA.out) | 0 | ||||
-rw-r--r-- | tests/zscanner/data/includes/include1 (renamed from src/zscanner/tests/data/includes/include1) | 0 | ||||
-rw-r--r-- | tests/zscanner/data/includes/include2 (renamed from src/zscanner/tests/data/includes/include2) | 0 | ||||
-rw-r--r-- | tests/zscanner/data/includes/include3 (renamed from src/zscanner/tests/data/includes/include3) | 0 | ||||
-rw-r--r-- | tests/zscanner/data/includes/include4 (renamed from src/zscanner/tests/data/includes/include4) | 0 | ||||
-rw-r--r-- | tests/zscanner/data/includes/include5 (renamed from src/zscanner/tests/data/includes/include5) | 0 | ||||
-rw-r--r-- | tests/zscanner/data/includes/include6 (renamed from src/zscanner/tests/data/includes/include6) | 0 | ||||
-rw-r--r-- | tests/zscanner/processing.c (renamed from src/zscanner/tests/processing.c) | 65 | ||||
-rw-r--r-- | tests/zscanner/processing.h (renamed from src/zscanner/tests/processing.h) | 12 | ||||
-rw-r--r-- | tests/zscanner/test_zscanner.in (renamed from src/zscanner/tests/unittests.in) | 7 | ||||
-rw-r--r-- | tests/zscanner/zscanner-tool.c (renamed from src/zscanner/tests/zscanner-tool.c) | 9 |
199 files changed, 142 insertions, 246 deletions
diff --git a/.gitignore b/.gitignore index 2e0679b6b..67d7e06c3 100644 --- a/.gitignore +++ b/.gitignore @@ -69,9 +69,6 @@ # zscanner /src/zscanner/libzscanner.pc /src/zscanner/scanner.c -/src/zscanner/tests/tmp/ -/src/zscanner/tests/unittests -/src/zscanner/tests/zscanner-tool /src/zscanner/version.h # Binaries @@ -84,14 +81,9 @@ /src/knsec3hash /src/knsupdate /src/kzonecheck -/src/rosedb_tool /src/utils/pykeymgr/pykeymgr -# Plugin binaries -/src/rosedb_tool - # Generated tarballs -/knot-*.tar.gz /knot-*.tar.xz # Code coverage diff --git a/Knot.files b/Knot.files index 29f8714f2..507e0c242 100644 --- a/Knot.files +++ b/Knot.files @@ -1,11 +1,3 @@ -libtap/runtests.c -libtap/tap/basic.c -libtap/tap/basic.h -libtap/tap/files.c -libtap/tap/files.h -libtap/tap/float.c -libtap/tap/float.h -libtap/tap/macros.h src/contrib/asan.h src/contrib/base32hex.c src/contrib/base32hex.h @@ -430,11 +422,6 @@ src/zscanner/functions.h src/zscanner/scanner.h src/zscanner/scanner.rl src/zscanner/scanner_body.rl -src/zscanner/tests/processing.c -src/zscanner/tests/processing.h -src/zscanner/tests/tests.c -src/zscanner/tests/tests.h -src/zscanner/tests/zscanner-tool.c tests-fuzz/fuzz_packet.c tests-fuzz/fuzz_zscanner.c tests-fuzz/knotd_wrap/afl-loop.h @@ -442,6 +429,14 @@ tests-fuzz/knotd_wrap/server.c tests-fuzz/knotd_wrap/tcp-handler.c tests-fuzz/knotd_wrap/udp-handler.c tests-fuzz/main.c +tests/_libtap/runtests.c +tests/_libtap/tap/basic.c +tests/_libtap/tap/basic.h +tests/_libtap/tap/files.c +tests/_libtap/tap/files.h +tests/_libtap/tap/float.c +tests/_libtap/tap/float.h +tests/_libtap/tap/macros.h tests/contrib/test_base32hex.c tests/contrib/test_base64.c tests/contrib/test_dynarray.c @@ -523,3 +518,6 @@ tests/modules/test_onlinesign.c tests/modules/test_rrl.c tests/utils/test_cert.c tests/utils/test_lookup.c +tests/zscanner/processing.c +tests/zscanner/processing.h +tests/zscanner/zscanner-tool.c diff --git a/Knot.includes b/Knot.includes index 076d39e86..71cc45d28 100644 --- a/Knot.includes +++ b/Knot.includes @@ -1,4 +1,3 @@ -libtap src src/contrib src/dnssec @@ -8,4 +7,4 @@ src/dnssec/shared src/zscanner tests tests-fuzz -tests-fuzz/wrap +tests-fuzz/knotd_wrap diff --git a/Makefile.am b/Makefile.am index 88d86ad86..618e77622 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,5 +1,5 @@ ACLOCAL_AMFLAGS = -I m4 -SUBDIRS = libtap src tests tests-fuzz python samples doc +SUBDIRS = src tests tests-fuzz python samples doc .PHONY: singlehtml install-singlehtml singlehtml install-singlehtml: @@ -7,8 +7,7 @@ singlehtml install-singlehtml: .PHONY: check-compile check-compile: - $(MAKE) $(AM_MAKEFLAGS) -C libtap $@ - $(MAKE) $(AM_MAKEFLAGS) -C src $@ + $(MAKE) $(AM_MAKEFLAGS) -C tests/_libtap $@ $(MAKE) $(AM_MAKEFLAGS) -C tests $@ $(MAKE) $(AM_MAKEFLAGS) -C tests-fuzz $@ diff --git a/configure.ac b/configure.ac index d32fa9cfa..c0171b7ee 100644 --- a/configure.ac +++ b/configure.ac @@ -581,8 +581,8 @@ AC_DEFINE_UNQUOTED([CONFIGURE_SUMMARY],["$result_msg_esc"],[Configure summary]) AC_CONFIG_FILES([Makefile Doxyfile doc/Makefile - libtap/Makefile tests/Makefile + tests/_libtap/Makefile tests-fuzz/Makefile samples/Makefile python/Makefile diff --git a/scripts/update-project-files.py b/scripts/update-project-files.py index c8018a8b7..004fbb37b 100755 --- a/scripts/update-project-files.py +++ b/scripts/update-project-files.py @@ -5,10 +5,9 @@ # SOURCES = [ - "src/*.c", "src/*.h", "src/*.rl", "src/*.l", - "src/*.y", "tests/*.c", "tests/*.h", + "src/*.c", "src/*.h", "src/*.rl", + "tests/*.c", "tests/*.h", "tests-fuzz/*.c", "tests-fuzz/*.h", - "libtap/*.c", "libtap/*.h", ] OUTPUT_FILE = "Knot.files" diff --git a/src/Makefile.am b/src/Makefile.am index 614c0b0be..4211d7432 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -1,11 +1,6 @@ ACLOCAL_AMFLAGS = -I $(top_srcdir)/m4 SUBDIRS = zscanner dnssec contrib/dnstap . -.PHONY: check-compile -check-compile: - $(MAKE) $(AM_MAKEFLAGS) -C zscanner $@ - $(MAKE) $(AM_MAKEFLAGS) -C dnssec $@ - lib_LTLIBRARIES = \ libknot.la noinst_LTLIBRARIES = \ diff --git a/src/zscanner/Makefile.am b/src/zscanner/Makefile.am index 60841453a..8cf6520f9 100644 --- a/src/zscanner/Makefile.am +++ b/src/zscanner/Makefile.am @@ -44,5 +44,3 @@ nodist_libzscanner_la_SOURCES = \ libzscanner_la_CPPFLAGS = $(AM_CPPFLAGS) $(CFLAG_VISIBILITY) libzscanner_la_LDFLAGS = \ $(libzscanner_VERSION_INFO) - -include $(srcdir)/tests/Makefile.inc diff --git a/src/zscanner/tests/.gitignore b/src/zscanner/tests/.gitignore deleted file mode 100644 index 7c67a150c..000000000 --- a/src/zscanner/tests/.gitignore +++ /dev/null @@ -1 +0,0 @@ -/runtests.log diff --git a/src/zscanner/tests/Makefile.inc b/src/zscanner/tests/Makefile.inc deleted file mode 100644 index d663e2cdd..000000000 --- a/src/zscanner/tests/Makefile.inc +++ /dev/null @@ -1,45 +0,0 @@ -LDADD = \ - $(top_builddir)/src/zscanner/libzscanner.la - -tests_zscanner_tool_SOURCES = \ - tests/zscanner-tool.c \ - tests/tests.h \ - tests/tests.c \ - tests/processing.h \ - tests/processing.c - -check_PROGRAMS = \ - tests/zscanner-tool - -check_SCRIPTS = \ - tests/unittests - -CLEANFILES += $(check_SCRIPTS) tests/runtests.log - -edit = sed \ - -e 's|@top_srcdir[@]|$(abs_top_srcdir)|g' \ - -e 's|@top_builddir[@]|$(abs_top_builddir)|g' - -tests/unittests: - @$(edit) < $(top_srcdir)/src/zscanner/$@.in > $(top_builddir)/src/zscanner/$@ - @chmod +x $(top_builddir)/src/zscanner/$@ - -check-compile: $(check_SCRIPTS) $(check_PROGRAMS) - - -AM_V_RUNTESTS = $(am__v_RUNTESTS_@AM_V@) -am__v_RUNTESTS_ = $(am__v_RUNTESTS_@AM_DEFAULT_V@) -am__v_RUNTESTS_0 = -am__v_RUNTESTS_1 = RET=$$?; if [ "$$RET" != "0" ]; then cat "$(top_builddir)/src/zscanner/tests/runtests.log"; exit $$RET; fi -check-local: $(check_PROGRAMS) - @$(top_builddir)/libtap/runtests \ - -s $(top_srcdir)/src/zscanner/tests \ - -b $(top_builddir)/src/zscanner/tests \ - -L $(top_builddir)/src/zscanner/tests/runtests.log \ - $(top_builddir)/src/zscanner/tests/unittests; \ - $(AM_V_RUNTESTS) - -EXTRA_DIST += \ - tests/unittests.in \ - tests/TESTS \ - tests/data diff --git a/src/zscanner/tests/tests.c b/src/zscanner/tests/tests.c deleted file mode 100644 index 3f0725bf5..000000000 --- a/src/zscanner/tests/tests.c +++ /dev/null @@ -1,79 +0,0 @@ -/* Copyright (C) 2011 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 - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see <http://www.gnu.org/licenses/>. - */ - -#include <inttypes.h> -#include <stdlib.h> -#include <stdio.h> -#include <time.h> - -#include "tests/tests.h" -#include "functions.c" - -int test__date_to_timestamp(void) -{ - time_t ref_timestamp, max_timestamp; - uint32_t test_timestamp; - uint8_t buffer[16]; - uint64_t val1, val2; // For time_t type unification. - struct tm tm; - - // Set UTC for strftime. - putenv("TZ=UTC"); - tzset(); - - // Get maximal allowed timestamp. - strptime("21051231235959", "%Y%m%d%H%M%S", &tm); - max_timestamp = mktime(&tm); - - // Testing loop over whole input interval. - for (ref_timestamp = 0; - ref_timestamp < max_timestamp; - ref_timestamp += 1) { - struct tm result; - // Get reference (correct) timestamp. - strftime((char*)buffer, sizeof(buffer), "%Y%m%d%H%M%S", - gmtime_r(&ref_timestamp, &result)); - - // Get testing timestamp. - test_timestamp = 0U; // prevents Wunitialized - date_to_timestamp(buffer, &test_timestamp); - - // Some continuous loging. - if (ref_timestamp % 10000000 == 0) { - val1 = ref_timestamp; - printf("%s = %"PRIu64"\n", buffer, val1); - } - - // Comparing results. - if (ref_timestamp != test_timestamp) { - val1 = ref_timestamp; - - if (ref_timestamp > test_timestamp) { - val2 = ref_timestamp - test_timestamp; - printf("%s = %"PRIu64", in - out = %"PRIu64"\n", - buffer, val1, val2); - } else { - val2 = test_timestamp - ref_timestamp; - printf("%s = %"PRIu64", out - in = %"PRIu64"\n", - buffer, val1, val2); - } - - return -1; - } - } - - return 0; -} diff --git a/src/zscanner/tests/tests.h b/src/zscanner/tests/tests.h deleted file mode 100644 index 475c6e87b..000000000 --- a/src/zscanner/tests/tests.h +++ /dev/null @@ -1,29 +0,0 @@ -/* 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 - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see <http://www.gnu.org/licenses/>. - */ -/*! - * \file - * - * \brief Zone scanner test functions. - * - * \addtogroup zone_scanner_test - * @{ - */ - -#pragma once - -int test__date_to_timestamp(void); - -/*! @} */ diff --git a/tests/.gitignore b/tests/.gitignore index d16f4525e..8e138bab0 100644 --- a/tests/.gitignore +++ b/tests/.gitignore @@ -87,3 +87,7 @@ /utils/test_cert /utils/test_lookup + +/zscanner/tmp +/zscanner/test_zscanner +/zscanner/zscanner-tool diff --git a/tests/Makefile.am b/tests/Makefile.am index ac1a44c0b..ca070c794 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -1,6 +1,9 @@ +ACLOCAL_AMFLAGS = -I m4 +SUBDIRS = _libtap . + AM_CPPFLAGS = \ -include $(top_builddir)/src/config.h \ - -I$(top_srcdir)/libtap \ + -I$(top_srcdir)/tests/_libtap \ -I$(top_srcdir)/src \ -I$(top_srcdir)/src/dnssec/lib \ -I$(top_srcdir)/src/dnssec/shared \ @@ -8,13 +11,20 @@ AM_CPPFLAGS = \ $(gnutls_CFLAGS) LDADD = \ - $(top_builddir)/libtap/libtap.la \ + $(top_builddir)/tests/_libtap/libtap.la \ $(top_builddir)/src/dnssec/libdnssec.la \ $(top_builddir)/src/libknot.la \ $(top_builddir)/src/libknotd.la \ - $(top_builddir)/src/libcontrib.la + $(top_builddir)/src/libcontrib.la \ + $(top_builddir)/src/zscanner/libzscanner.la -EXTRA_DIST = dnssec/sample_keys.h +EXTRA_DIST = \ + dnssec/sample_keys.h \ + knot/semantic_check_data \ + knot/test_semantic_check.in \ + zscanner/data \ + zscanner/test_zscanner.in \ + zscanner/TESTS check_PROGRAMS = \ contrib/test_base32hex \ @@ -122,7 +132,7 @@ check_PROGRAMS += \ endif endif -dnssec_keystore_pkcs11_CPPFLAGS = \ +dnssec_test_keystore_pkcs11_CPPFLAGS = \ $(AM_CPPFLAGS) \ -DLIBDIR='"$(libdir)"' @@ -131,7 +141,7 @@ utils_test_lookup_CPPFLAGS = \ $(libedit_CFLAGS) utils_test_lookup_LDADD = \ - $(top_builddir)/libtap/libtap.la \ + $(top_builddir)/tests/_libtap/libtap.la \ $(top_builddir)/src/libknotus.la \ $(libedit_LIBS) @@ -140,13 +150,35 @@ utils_test_cert_CPPFLAGS = \ $(libedit_CFLAGS) utils_test_cert_LDADD = \ - $(top_builddir)/libtap/libtap.la \ + $(top_builddir)/tests/_libtap/libtap.la \ $(top_builddir)/src/libknotus.la \ $(libedit_LIBS) -CLEANFILES = runtests.log +EXTRA_PROGRAMS = \ + zscanner/zscanner-tool + +zscanner_zscanner_tool_SOURCES = \ + zscanner/zscanner-tool.c \ + zscanner/processing.h \ + zscanner/processing.c + +check_SCRIPTS = \ + knot/test_semantic_check \ + zscanner/test_zscanner + +edit = $(SED) \ + -e 's|@top_srcdir[@]|$(abs_top_srcdir)|g' \ + -e 's|@top_builddir[@]|$(abs_top_builddir)|g' + +knot/test_semantic_check: + @$(edit) < $(top_srcdir)/tests/$@.in > $(top_builddir)/tests/$@ + @chmod +x $(top_builddir)/tests/$@ + +zscanner/test_zscanner: zscanner/zscanner-tool + @$(edit) < $(top_srcdir)/tests/$@.in > $(top_builddir)/tests/$@ + @chmod +x $(top_builddir)/tests/$@ -include $(srcdir)/knot/semantic_check_data/Makefile.inc +CLEANFILES = $(check_SCRIPTS) $(EXTRA_PROGRAMS) runtests.log check-compile: $(check_PROGRAMS) $(check_SCRIPTS) @@ -155,10 +187,8 @@ am__v_RUNTESTS_ = $(am__v_RUNTESTS_@AM_DEFAULT_V@) am__v_RUNTESTS_0 = am__v_RUNTESTS_1 = RET=$$?; if [ "$$RET" != "0" ]; then cat "$(builddir)/runtests.log"; exit $$RET; fi check-local: $(check_PROGRAMS) $(check_SCRIPTS) - @$(top_builddir)/libtap/runtests -s $(srcdir) \ - -b $(builddir) \ - -L $(builddir)/runtests.log \ - $(check_PROGRAMS) $(check_SCRIPTS); \ + @$(top_builddir)/tests/_libtap/runtests -s $(srcdir) -b $(builddir) \ + -L $(builddir)/runtests.log $(check_PROGRAMS) $(check_SCRIPTS); \ $(AM_V_RUNTESTS) knot_test_acl_SOURCES = knot/test_acl.c knot/test_conf.h diff --git a/libtap/.gitignore b/tests/_libtap/.gitignore index 62e957fac..62e957fac 100644 --- a/libtap/.gitignore +++ b/tests/_libtap/.gitignore diff --git a/libtap/Makefile.am b/tests/_libtap/Makefile.am index 81c4d288c..f14da0e1b 100644 --- a/libtap/Makefile.am +++ b/tests/_libtap/Makefile.am @@ -3,9 +3,12 @@ AM_CPPFLAGS = \ -I$(top_srcdir)/src libtap_la_SOURCES = \ - tap/basic.c tap/basic.h \ - tap/files.c tap/files.h \ - tap/float.c tap/float.h \ + tap/basic.c \ + tap/basic.h \ + tap/files.c \ + tap/files.h \ + tap/float.c \ + tap/float.h \ tap/macros.h check_LTLIBRARIES = libtap.la diff --git a/libtap/README b/tests/_libtap/README index 5d38748f7..5d38748f7 100644 --- a/libtap/README +++ b/tests/_libtap/README diff --git a/libtap/runtests.c b/tests/_libtap/runtests.c index 0464fbb46..0464fbb46 100644 --- a/libtap/runtests.c +++ b/tests/_libtap/runtests.c diff --git a/libtap/tap/basic.c b/tests/_libtap/tap/basic.c index 23b595ce6..23b595ce6 100644 --- a/libtap/tap/basic.c +++ b/tests/_libtap/tap/basic.c diff --git a/libtap/tap/basic.h b/tests/_libtap/tap/basic.h index 2e1b7e3c0..2e1b7e3c0 100644 --- a/libtap/tap/basic.h +++ b/tests/_libtap/tap/basic.h diff --git a/libtap/tap/files.c b/tests/_libtap/tap/files.c index 2e67e9e57..2e67e9e57 100644 --- a/libtap/tap/files.c +++ b/tests/_libtap/tap/files.c diff --git a/libtap/tap/files.h b/tests/_libtap/tap/files.h index bfc609058..bfc609058 100644 --- a/libtap/tap/files.h +++ b/tests/_libtap/tap/files.h diff --git a/libtap/tap/float.c b/tests/_libtap/tap/float.c index 5c0c643c9..5c0c643c9 100644 --- a/libtap/tap/float.c +++ b/tests/_libtap/tap/float.c diff --git a/libtap/tap/float.h b/tests/_libtap/tap/float.h index 5c58b5b36..5c58b5b36 100644 --- a/libtap/tap/float.h +++ b/tests/_libtap/tap/float.h diff --git a/libtap/tap/libtap.sh b/tests/_libtap/tap/libtap.sh index 0ffab2d23..0ffab2d23 100644 --- a/libtap/tap/libtap.sh +++ b/tests/_libtap/tap/libtap.sh diff --git a/libtap/tap/macros.h b/tests/_libtap/tap/macros.h index 31081a48b..31081a48b 100644 --- a/libtap/tap/macros.h +++ b/tests/_libtap/tap/macros.h diff --git a/tests/knot/semantic_check_data/Makefile.inc b/tests/knot/semantic_check_data/Makefile.inc deleted file mode 100644 index 9005c312a..000000000 --- a/tests/knot/semantic_check_data/Makefile.inc +++ /dev/null @@ -1,16 +0,0 @@ -check_SCRIPTS = \ - knot/test_semantic_check - -CLEANFILES += $(check_SCRIPTS) - -edit = $(SED) \ - -e 's|@top_srcdir[@]|$(abs_top_srcdir)|g' \ - -e 's|@top_builddir[@]|$(abs_top_builddir)|g' - -knot/test_semantic_check: $(top_srcdir)/tests/knot/test_semantic_check.in - @$(edit) < $(top_srcdir)/tests/knot/test_semantic_check.in > $(top_builddir)/tests/knot/test_semantic_check - @chmod +x $(top_builddir)/tests/knot/test_semantic_check - -EXTRA_DIST += \ - knot/test_semantic_check.in \ - knot/semantic_check_data diff --git a/tests/knot/test_semantic_check.in b/tests/knot/test_semantic_check.in index 9a769e1b8..bc8f2be97 100644 --- a/tests/knot/test_semantic_check.in +++ b/tests/knot/test_semantic_check.in @@ -3,7 +3,7 @@ KZONECHECK="@top_builddir@/src/kzonecheck" DATA="@top_srcdir@/tests/knot/semantic_check_data" -. "@top_srcdir@/libtap/tap/libtap.sh" +. "@top_srcdir@/tests/_libtap/tap/libtap.sh" TMPDIR=$(test_tmpdir) LOG="$TMPDIR/log" diff --git a/src/zscanner/tests/TESTS b/tests/zscanner/TESTS index f26b858e8..f26b858e8 100644 --- a/src/zscanner/tests/TESTS +++ b/tests/zscanner/TESTS diff --git a/src/zscanner/tests/data/00-0_general.in b/tests/zscanner/data/00-0_general.in index de9c3f079..de9c3f079 100644 --- a/src/zscanner/tests/data/00-0_general.in +++ b/tests/zscanner/data/00-0_general.in diff --git a/src/zscanner/tests/data/00-0_general.out b/tests/zscanner/data/00-0_general.out index 9acf1cbf2..9acf1cbf2 100644 --- a/src/zscanner/tests/data/00-0_general.out +++ b/tests/zscanner/data/00-0_general.out diff --git a/src/zscanner/tests/data/00-1_general.in b/tests/zscanner/data/00-1_general.in index 24239098c..24239098c 100644 --- a/src/zscanner/tests/data/00-1_general.in +++ b/tests/zscanner/data/00-1_general.in diff --git a/src/zscanner/tests/data/00-1_general.out b/tests/zscanner/data/00-1_general.out index 85b0653c3..85b0653c3 100644 --- a/src/zscanner/tests/data/00-1_general.out +++ b/tests/zscanner/data/00-1_general.out diff --git a/src/zscanner/tests/data/00-2_general.in b/tests/zscanner/data/00-2_general.in index 460eeb512..460eeb512 100644 --- a/src/zscanner/tests/data/00-2_general.in +++ b/tests/zscanner/data/00-2_general.in diff --git a/src/zscanner/tests/data/00-2_general.out b/tests/zscanner/data/00-2_general.out index 79776a7bc..79776a7bc 100644 --- a/src/zscanner/tests/data/00-2_general.out +++ b/tests/zscanner/data/00-2_general.out diff --git a/src/zscanner/tests/data/00-3_general.in b/tests/zscanner/data/00-3_general.in index 6ce107c5a..6ce107c5a 100644 --- a/src/zscanner/tests/data/00-3_general.in +++ b/tests/zscanner/data/00-3_general.in diff --git a/src/zscanner/tests/data/00-3_general.out b/tests/zscanner/data/00-3_general.out index bc066729d..bc066729d 100644 --- a/src/zscanner/tests/data/00-3_general.out +++ b/tests/zscanner/data/00-3_general.out diff --git a/src/zscanner/tests/data/00-4_general.in b/tests/zscanner/data/00-4_general.in index e69de29bb..e69de29bb 100644 --- a/src/zscanner/tests/data/00-4_general.in +++ b/tests/zscanner/data/00-4_general.in diff --git a/src/zscanner/tests/data/00-4_general.out b/tests/zscanner/data/00-4_general.out index e69de29bb..e69de29bb 100644 --- a/src/zscanner/tests/data/00-4_general.out +++ b/tests/zscanner/data/00-4_general.out diff --git a/src/zscanner/tests/data/01_owner.in b/tests/zscanner/data/01_owner.in index 0108be3e8..0108be3e8 100644 --- a/src/zscanner/tests/data/01_owner.in +++ b/tests/zscanner/data/01_owner.in diff --git a/src/zscanner/tests/data/01_owner.out b/tests/zscanner/data/01_owner.out index 26a8454c8..26a8454c8 100644 --- a/src/zscanner/tests/data/01_owner.out +++ b/tests/zscanner/data/01_owner.out diff --git a/src/zscanner/tests/data/02_class.in b/tests/zscanner/data/02_class.in index c4347e710..c4347e710 100644 --- a/src/zscanner/tests/data/02_class.in +++ b/tests/zscanner/data/02_class.in diff --git a/src/zscanner/tests/data/02_class.out b/tests/zscanner/data/02_class.out index 69daae31d..69daae31d 100644 --- a/src/zscanner/tests/data/02_class.out +++ b/tests/zscanner/data/02_class.out diff --git a/src/zscanner/tests/data/03_rrttl.in b/tests/zscanner/data/03_rrttl.in index 7c57d734b..7c57d734b 100644 --- a/src/zscanner/tests/data/03_rrttl.in +++ b/tests/zscanner/data/03_rrttl.in diff --git a/src/zscanner/tests/data/03_rrttl.out b/tests/zscanner/data/03_rrttl.out index f5cc90767..f5cc90767 100644 --- a/src/zscanner/tests/data/03_rrttl.out +++ b/tests/zscanner/data/03_rrttl.out diff --git a/src/zscanner/tests/data/04-0_ORIGIN.in b/tests/zscanner/data/04-0_ORIGIN.in index 4d65ec4a5..4d65ec4a5 100644 --- a/src/zscanner/tests/data/04-0_ORIGIN.in +++ b/tests/zscanner/data/04-0_ORIGIN.in diff --git a/src/zscanner/tests/data/04-0_ORIGIN.out b/tests/zscanner/data/04-0_ORIGIN.out index 92dc459fe..92dc459fe 100644 --- a/src/zscanner/tests/data/04-0_ORIGIN.out +++ b/tests/zscanner/data/04-0_ORIGIN.out diff --git a/src/zscanner/tests/data/04-1_ORIGIN.in b/tests/zscanner/data/04-1_ORIGIN.in index 871c0645e..871c0645e 100644 --- a/src/zscanner/tests/data/04-1_ORIGIN.in +++ b/tests/zscanner/data/04-1_ORIGIN.in diff --git a/src/zscanner/tests/data/04-1_ORIGIN.out b/tests/zscanner/data/04-1_ORIGIN.out index 467de10a8..467de10a8 100644 --- a/src/zscanner/tests/data/04-1_ORIGIN.out +++ b/tests/zscanner/data/04-1_ORIGIN.out diff --git a/src/zscanner/tests/data/04-2_ORIGIN.in b/tests/zscanner/data/04-2_ORIGIN.in index 8dd2e2026..8dd2e2026 100644 --- a/src/zscanner/tests/data/04-2_ORIGIN.in +++ b/tests/zscanner/data/04-2_ORIGIN.in diff --git a/src/zscanner/tests/data/04-2_ORIGIN.out b/tests/zscanner/data/04-2_ORIGIN.out index 467de10a8..467de10a8 100644 --- a/src/zscanner/tests/data/04-2_ORIGIN.out +++ b/tests/zscanner/data/04-2_ORIGIN.out diff --git a/src/zscanner/tests/data/04-3_ORIGIN.in b/tests/zscanner/data/04-3_ORIGIN.in index 26d187269..26d187269 100644 --- a/src/zscanner/tests/data/04-3_ORIGIN.in +++ b/tests/zscanner/data/04-3_ORIGIN.in diff --git a/src/zscanner/tests/data/04-3_ORIGIN.out b/tests/zscanner/data/04-3_ORIGIN.out index b7d67e510..b7d67e510 100644 --- a/src/zscanner/tests/data/04-3_ORIGIN.out +++ b/tests/zscanner/data/04-3_ORIGIN.out diff --git a/src/zscanner/tests/data/04-4_ORIGIN.in b/tests/zscanner/data/04-4_ORIGIN.in index 0be4721ff..0be4721ff 100644 --- a/src/zscanner/tests/data/04-4_ORIGIN.in +++ b/tests/zscanner/data/04-4_ORIGIN.in diff --git a/src/zscanner/tests/data/04-4_ORIGIN.out b/tests/zscanner/data/04-4_ORIGIN.out index 03a073855..03a073855 100644 --- a/src/zscanner/tests/data/04-4_ORIGIN.out +++ b/tests/zscanner/data/04-4_ORIGIN.out diff --git a/src/zscanner/tests/data/04-5_ORIGIN.in b/tests/zscanner/data/04-5_ORIGIN.in index 170d465f8..170d465f8 100644 --- a/src/zscanner/tests/data/04-5_ORIGIN.in +++ b/tests/zscanner/data/04-5_ORIGIN.in diff --git a/src/zscanner/tests/data/04-5_ORIGIN.out b/tests/zscanner/data/04-5_ORIGIN.out index 03a073855..03a073855 100644 --- a/src/zscanner/tests/data/04-5_ORIGIN.out +++ b/tests/zscanner/data/04-5_ORIGIN.out diff --git a/src/zscanner/tests/data/04-6_ORIGIN.in b/tests/zscanner/data/04-6_ORIGIN.in index db9652d8b..db9652d8b 100644 --- a/src/zscanner/tests/data/04-6_ORIGIN.in +++ b/tests/zscanner/data/04-6_ORIGIN.in diff --git a/src/zscanner/tests/data/04-6_ORIGIN.out b/tests/zscanner/data/04-6_ORIGIN.out index b7d67e510..b7d67e510 100644 --- a/src/zscanner/tests/data/04-6_ORIGIN.out +++ b/tests/zscanner/data/04-6_ORIGIN.out diff --git a/src/zscanner/tests/data/04-7_ORIGIN.in b/tests/zscanner/data/04-7_ORIGIN.in index 556646c85..556646c85 100644 --- a/src/zscanner/tests/data/04-7_ORIGIN.in +++ b/tests/zscanner/data/04-7_ORIGIN.in diff --git a/src/zscanner/tests/data/04-7_ORIGIN.out b/tests/zscanner/data/04-7_ORIGIN.out index b7d67e510..b7d67e510 100644 --- a/src/zscanner/tests/data/04-7_ORIGIN.out +++ b/tests/zscanner/data/04-7_ORIGIN.out diff --git a/src/zscanner/tests/data/04-8_ORIGIN.in b/tests/zscanner/data/04-8_ORIGIN.in index 445cbec7d..445cbec7d 100644 --- a/src/zscanner/tests/data/04-8_ORIGIN.in +++ b/tests/zscanner/data/04-8_ORIGIN.in diff --git a/src/zscanner/tests/data/04-8_ORIGIN.out b/tests/zscanner/data/04-8_ORIGIN.out index 788a4958a..788a4958a 100644 --- a/src/zscanner/tests/data/04-8_ORIGIN.out +++ b/tests/zscanner/data/04-8_ORIGIN.out diff --git a/src/zscanner/tests/data/04-9_ORIGIN.in b/tests/zscanner/data/04-9_ORIGIN.in index e0a4b9582..e0a4b9582 100644 --- a/src/zscanner/tests/data/04-9_ORIGIN.in +++ b/tests/zscanner/data/04-9_ORIGIN.in diff --git a/src/zscanner/tests/data/04-9_ORIGIN.out b/tests/zscanner/data/04-9_ORIGIN.out index eef0ab560..eef0ab560 100644 --- a/src/zscanner/tests/data/04-9_ORIGIN.out +++ b/tests/zscanner/data/04-9_ORIGIN.out diff --git a/src/zscanner/tests/data/05-0_TTL.in b/tests/zscanner/data/05-0_TTL.in index baa8f38d2..baa8f38d2 100644 --- a/src/zscanner/tests/data/05-0_TTL.in +++ b/tests/zscanner/data/05-0_TTL.in diff --git a/src/zscanner/tests/data/05-0_TTL.out b/tests/zscanner/data/05-0_TTL.out index 93c765161..93c765161 100644 --- a/src/zscanner/tests/data/05-0_TTL.out +++ b/tests/zscanner/data/05-0_TTL.out diff --git a/src/zscanner/tests/data/05-1_TTL.in b/tests/zscanner/data/05-1_TTL.in index 519fe79cc..519fe79cc 100644 --- a/src/zscanner/tests/data/05-1_TTL.in +++ b/tests/zscanner/data/05-1_TTL.in diff --git a/src/zscanner/tests/data/05-1_TTL.out b/tests/zscanner/data/05-1_TTL.out index 18492671d..18492671d 100644 --- a/src/zscanner/tests/data/05-1_TTL.out +++ b/tests/zscanner/data/05-1_TTL.out diff --git a/src/zscanner/tests/data/05-2_TTL.in b/tests/zscanner/data/05-2_TTL.in index ed112daa4..ed112daa4 100644 --- a/src/zscanner/tests/data/05-2_TTL.in +++ b/tests/zscanner/data/05-2_TTL.in diff --git a/src/zscanner/tests/data/05-2_TTL.out b/tests/zscanner/data/05-2_TTL.out index 18492671d..18492671d 100644 --- a/src/zscanner/tests/data/05-2_TTL.out +++ b/tests/zscanner/data/05-2_TTL.out diff --git a/src/zscanner/tests/data/05-3_TTL.in b/tests/zscanner/data/05-3_TTL.in index d96c9ba7c..d96c9ba7c 100644 --- a/src/zscanner/tests/data/05-3_TTL.in +++ b/tests/zscanner/data/05-3_TTL.in diff --git a/src/zscanner/tests/data/05-3_TTL.out b/tests/zscanner/data/05-3_TTL.out index 18492671d..18492671d 100644 --- a/src/zscanner/tests/data/05-3_TTL.out +++ b/tests/zscanner/data/05-3_TTL.out diff --git a/src/zscanner/tests/data/05-4_TTL.in b/tests/zscanner/data/05-4_TTL.in index efaf4d0f5..efaf4d0f5 100644 --- a/src/zscanner/tests/data/05-4_TTL.in +++ b/tests/zscanner/data/05-4_TTL.in diff --git a/src/zscanner/tests/data/05-4_TTL.out b/tests/zscanner/data/05-4_TTL.out index d4bef9895..d4bef9895 100644 --- a/src/zscanner/tests/data/05-4_TTL.out +++ b/tests/zscanner/data/05-4_TTL.out diff --git a/src/zscanner/tests/data/06-0_INCLUDE.in b/tests/zscanner/data/06-0_INCLUDE.in index 962e6c949..962e6c949 100644 --- a/src/zscanner/tests/data/06-0_INCLUDE.in +++ b/tests/zscanner/data/06-0_INCLUDE.in diff --git a/src/zscanner/tests/data/06-0_INCLUDE.out b/tests/zscanner/data/06-0_INCLUDE.out index 2536f727d..2536f727d 100644 --- a/src/zscanner/tests/data/06-0_INCLUDE.out +++ b/tests/zscanner/data/06-0_INCLUDE.out diff --git a/src/zscanner/tests/data/06-1_INCLUDE.in b/tests/zscanner/data/06-1_INCLUDE.in index 194fb5292..194fb5292 100644 --- a/src/zscanner/tests/data/06-1_INCLUDE.in +++ b/tests/zscanner/data/06-1_INCLUDE.in diff --git a/src/zscanner/tests/data/06-1_INCLUDE.out b/tests/zscanner/data/06-1_INCLUDE.out index 663492132..663492132 100644 --- a/src/zscanner/tests/data/06-1_INCLUDE.out +++ b/tests/zscanner/data/06-1_INCLUDE.out diff --git a/src/zscanner/tests/data/06-2_INCLUDE.in b/tests/zscanner/data/06-2_INCLUDE.in index 21bcf0539..21bcf0539 100644 --- a/src/zscanner/tests/data/06-2_INCLUDE.in +++ b/tests/zscanner/data/06-2_INCLUDE.in diff --git a/src/zscanner/tests/data/06-2_INCLUDE.out b/tests/zscanner/data/06-2_INCLUDE.out index 663492132..663492132 100644 --- a/src/zscanner/tests/data/06-2_INCLUDE.out +++ b/tests/zscanner/data/06-2_INCLUDE.out diff --git a/src/zscanner/tests/data/06-3_INCLUDE.in b/tests/zscanner/data/06-3_INCLUDE.in index f7079b4db..f7079b4db 100644 --- a/src/zscanner/tests/data/06-3_INCLUDE.in +++ b/tests/zscanner/data/06-3_INCLUDE.in diff --git a/src/zscanner/tests/data/06-3_INCLUDE.out b/tests/zscanner/data/06-3_INCLUDE.out index 6823154d0..6823154d0 100644 --- a/src/zscanner/tests/data/06-3_INCLUDE.out +++ b/tests/zscanner/data/06-3_INCLUDE.out diff --git a/src/zscanner/tests/data/06-4_INCLUDE.in b/tests/zscanner/data/06-4_INCLUDE.in index 3cdc79de9..3cdc79de9 100644 --- a/src/zscanner/tests/data/06-4_INCLUDE.in +++ b/tests/zscanner/data/06-4_INCLUDE.in diff --git a/src/zscanner/tests/data/06-4_INCLUDE.out b/tests/zscanner/data/06-4_INCLUDE.out index e09e5d1cf..e09e5d1cf 100644 --- a/src/zscanner/tests/data/06-4_INCLUDE.out +++ b/tests/zscanner/data/06-4_INCLUDE.out diff --git a/src/zscanner/tests/data/06-5_INCLUDE.in b/tests/zscanner/data/06-5_INCLUDE.in index 1d658120c..1d658120c 100644 --- a/src/zscanner/tests/data/06-5_INCLUDE.in +++ b/tests/zscanner/data/06-5_INCLUDE.in diff --git a/src/zscanner/tests/data/06-5_INCLUDE.out b/tests/zscanner/data/06-5_INCLUDE.out index e69de29bb..e69de29bb 100644 --- a/src/zscanner/tests/data/06-5_INCLUDE.out +++ b/tests/zscanner/data/06-5_INCLUDE.out diff --git a/src/zscanner/tests/data/06-6_INCLUDE.in b/tests/zscanner/data/06-6_INCLUDE.in index cbfda6493..cbfda6493 100644 --- a/src/zscanner/tests/data/06-6_INCLUDE.in +++ b/tests/zscanner/data/06-6_INCLUDE.in diff --git a/src/zscanner/tests/data/06-6_INCLUDE.out b/tests/zscanner/data/06-6_INCLUDE.out index a9c0259b4..a9c0259b4 100644 --- a/src/zscanner/tests/data/06-6_INCLUDE.out +++ b/tests/zscanner/data/06-6_INCLUDE.out diff --git a/src/zscanner/tests/data/06-7_INCLUDE.in b/tests/zscanner/data/06-7_INCLUDE.in index 24deef71f..24deef71f 100644 --- a/src/zscanner/tests/data/06-7_INCLUDE.in +++ b/tests/zscanner/data/06-7_INCLUDE.in diff --git a/src/zscanner/tests/data/06-7_INCLUDE.out b/tests/zscanner/data/06-7_INCLUDE.out index cbbb0c188..cbbb0c188 100644 --- a/src/zscanner/tests/data/06-7_INCLUDE.out +++ b/tests/zscanner/data/06-7_INCLUDE.out diff --git a/src/zscanner/tests/data/06-8_INCLUDE.in b/tests/zscanner/data/06-8_INCLUDE.in index c856668a7..c856668a7 100644 --- a/src/zscanner/tests/data/06-8_INCLUDE.in +++ b/tests/zscanner/data/06-8_INCLUDE.in diff --git a/src/zscanner/tests/data/06-8_INCLUDE.out b/tests/zscanner/data/06-8_INCLUDE.out index 4581388e7..4581388e7 100644 --- a/src/zscanner/tests/data/06-8_INCLUDE.out +++ b/tests/zscanner/data/06-8_INCLUDE.out diff --git a/src/zscanner/tests/data/07-0-rdata.in b/tests/zscanner/data/07-0-rdata.in index a79403f04..a79403f04 100644 --- a/src/zscanner/tests/data/07-0-rdata.in +++ b/tests/zscanner/data/07-0-rdata.in diff --git a/src/zscanner/tests/data/07-0-rdata.out b/tests/zscanner/data/07-0-rdata.out index ed303f60b..ed303f60b 100644 --- a/src/zscanner/tests/data/07-0-rdata.out +++ b/tests/zscanner/data/07-0-rdata.out diff --git a/src/zscanner/tests/data/07-1-rdata.in b/tests/zscanner/data/07-1-rdata.in index 7a5a11ac9..7a5a11ac9 100644 --- a/src/zscanner/tests/data/07-1-rdata.in +++ b/tests/zscanner/data/07-1-rdata.in diff --git a/src/zscanner/tests/data/07-1-rdata.out b/tests/zscanner/data/07-1-rdata.out index 1702677c2..1702677c2 100644 --- a/src/zscanner/tests/data/07-1-rdata.out +++ b/tests/zscanner/data/07-1-rdata.out diff --git a/src/zscanner/tests/data/07-2-rdata.in b/tests/zscanner/data/07-2-rdata.in index 7a4c8fe5e..7a4c8fe5e 100644 --- a/src/zscanner/tests/data/07-2-rdata.in +++ b/tests/zscanner/data/07-2-rdata.in diff --git a/src/zscanner/tests/data/07-2-rdata.out b/tests/zscanner/data/07-2-rdata.out index 3f52437e5..3f52437e5 100644 --- a/src/zscanner/tests/data/07-2-rdata.out +++ b/tests/zscanner/data/07-2-rdata.out diff --git a/src/zscanner/tests/data/07-3-rdata.in b/tests/zscanner/data/07-3-rdata.in index 338b212ed..338b212ed 100644 --- a/src/zscanner/tests/data/07-3-rdata.in +++ b/tests/zscanner/data/07-3-rdata.in diff --git a/src/zscanner/tests/data/07-3-rdata.out b/tests/zscanner/data/07-3-rdata.out index 3f52437e5..3f52437e5 100644 --- a/src/zscanner/tests/data/07-3-rdata.out +++ b/tests/zscanner/data/07-3-rdata.out diff --git a/src/zscanner/tests/data/07-4-rdata.in b/tests/zscanner/data/07-4-rdata.in index 74a45dd61..74a45dd61 100644 --- a/src/zscanner/tests/data/07-4-rdata.in +++ b/tests/zscanner/data/07-4-rdata.in diff --git a/src/zscanner/tests/data/07-4-rdata.out b/tests/zscanner/data/07-4-rdata.out index 3f52437e5..3f52437e5 100644 --- a/src/zscanner/tests/data/07-4-rdata.out +++ b/tests/zscanner/data/07-4-rdata.out diff --git a/src/zscanner/tests/data/10_A.in b/tests/zscanner/data/10_A.in index 6c7c90a61..6c7c90a61 100644 --- a/src/zscanner/tests/data/10_A.in +++ b/tests/zscanner/data/10_A.in diff --git a/src/zscanner/tests/data/10_A.out b/tests/zscanner/data/10_A.out index dda68abbd..dda68abbd 100644 --- a/src/zscanner/tests/data/10_A.out +++ b/tests/zscanner/data/10_A.out diff --git a/src/zscanner/tests/data/11_AAAA.in b/tests/zscanner/data/11_AAAA.in index 48c4b37fa..48c4b37fa 100644 --- a/src/zscanner/tests/data/11_AAAA.in +++ b/tests/zscanner/data/11_AAAA.in diff --git a/src/zscanner/tests/data/11_AAAA.out b/tests/zscanner/data/11_AAAA.out index 0cb174a49..0cb174a49 100644 --- a/src/zscanner/tests/data/11_AAAA.out +++ b/tests/zscanner/data/11_AAAA.out diff --git a/src/zscanner/tests/data/12_TXT.in b/tests/zscanner/data/12_TXT.in index cdd0eaa5e..cdd0eaa5e 100644 --- a/src/zscanner/tests/data/12_TXT.in +++ b/tests/zscanner/data/12_TXT.in diff --git a/src/zscanner/tests/data/12_TXT.out b/tests/zscanner/data/12_TXT.out index 283b1e0b3..283b1e0b3 100644 --- a/src/zscanner/tests/data/12_TXT.out +++ b/tests/zscanner/data/12_TXT.out diff --git a/src/zscanner/tests/data/13_SPF.in b/tests/zscanner/data/13_SPF.in index 0ad6c84b5..0ad6c84b5 100644 --- a/src/zscanner/tests/data/13_SPF.in +++ b/tests/zscanner/data/13_SPF.in diff --git a/src/zscanner/tests/data/13_SPF.out b/tests/zscanner/data/13_SPF.out index be7fb3582..be7fb3582 100644 --- a/src/zscanner/tests/data/13_SPF.out +++ b/tests/zscanner/data/13_SPF.out diff --git a/src/zscanner/tests/data/14_NS.in b/tests/zscanner/data/14_NS.in index b56a57982..b56a57982 100644 --- a/src/zscanner/tests/data/14_NS.in +++ b/tests/zscanner/data/14_NS.in diff --git a/src/zscanner/tests/data/14_NS.out b/tests/zscanner/data/14_NS.out index 08d739a9b..08d739a9b 100644 --- a/src/zscanner/tests/data/14_NS.out +++ b/tests/zscanner/data/14_NS.out diff --git a/src/zscanner/tests/data/15_CNAME.in b/tests/zscanner/data/15_CNAME.in index 806b8f9ae..806b8f9ae 100644 --- a/src/zscanner/tests/data/15_CNAME.in +++ b/tests/zscanner/data/15_CNAME.in diff --git a/src/zscanner/tests/data/15_CNAME.out b/tests/zscanner/data/15_CNAME.out index 3c3a55dc0..3c3a55dc0 100644 --- a/src/zscanner/tests/data/15_CNAME.out +++ b/tests/zscanner/data/15_CNAME.out diff --git a/src/zscanner/tests/data/16_PTR.in b/tests/zscanner/data/16_PTR.in index 3694e7da3..3694e7da3 100644 --- a/src/zscanner/tests/data/16_PTR.in +++ b/tests/zscanner/data/16_PTR.in diff --git a/src/zscanner/tests/data/16_PTR.out b/tests/zscanner/data/16_PTR.out index 55d94b9ab..55d94b9ab 100644 --- a/src/zscanner/tests/data/16_PTR.out +++ b/tests/zscanner/data/16_PTR.out diff --git a/src/zscanner/tests/data/17_DNAME.in b/tests/zscanner/data/17_DNAME.in index 5e9ba71db..5e9ba71db 100644 --- a/src/zscanner/tests/data/17_DNAME.in +++ b/tests/zscanner/data/17_DNAME.in diff --git a/src/zscanner/tests/data/17_DNAME.out b/tests/zscanner/data/17_DNAME.out index 35f11d88a..35f11d88a 100644 --- a/src/zscanner/tests/data/17_DNAME.out +++ b/tests/zscanner/data/17_DNAME.out diff --git a/src/zscanner/tests/data/18_MX.in b/tests/zscanner/data/18_MX.in index 61e6afbde..61e6afbde 100644 --- a/src/zscanner/tests/data/18_MX.in +++ b/tests/zscanner/data/18_MX.in diff --git a/src/zscanner/tests/data/18_MX.out b/tests/zscanner/data/18_MX.out index 0a5003852..0a5003852 100644 --- a/src/zscanner/tests/data/18_MX.out +++ b/tests/zscanner/data/18_MX.out diff --git a/src/zscanner/tests/data/19_AFSDB.in b/tests/zscanner/data/19_AFSDB.in index be569e49f..be569e49f 100644 --- a/src/zscanner/tests/data/19_AFSDB.in +++ b/tests/zscanner/data/19_AFSDB.in diff --git a/src/zscanner/tests/data/19_AFSDB.out b/tests/zscanner/data/19_AFSDB.out index b5c77eb87..b5c77eb87 100644 --- a/src/zscanner/tests/data/19_AFSDB.out +++ b/tests/zscanner/data/19_AFSDB.out diff --git a/src/zscanner/tests/data/20_RT.in b/tests/zscanner/data/20_RT.in index 3bc774d0c..3bc774d0c 100644 --- a/src/zscanner/tests/data/20_RT.in +++ b/tests/zscanner/data/20_RT.in diff --git a/src/zscanner/tests/data/20_RT.out b/tests/zscanner/data/20_RT.out index 8be89a3e4..8be89a3e4 100644 --- a/src/zscanner/tests/data/20_RT.out +++ b/tests/zscanner/data/20_RT.out diff --git a/src/zscanner/tests/data/21_KX.in b/tests/zscanner/data/21_KX.in index 529480db7..529480db7 100644 --- a/src/zscanner/tests/data/21_KX.in +++ b/tests/zscanner/data/21_KX.in diff --git a/src/zscanner/tests/data/21_KX.out b/tests/zscanner/data/21_KX.out index 1bc91e695..1bc91e695 100644 --- a/src/zscanner/tests/data/21_KX.out +++ b/tests/zscanner/data/21_KX.out diff --git a/src/zscanner/tests/data/22_HINFO.in b/tests/zscanner/data/22_HINFO.in index 4cd5ab83d..4cd5ab83d 100644 --- a/src/zscanner/tests/data/22_HINFO.in +++ b/tests/zscanner/data/22_HINFO.in diff --git a/src/zscanner/tests/data/22_HINFO.out b/tests/zscanner/data/22_HINFO.out index fa6672963..fa6672963 100644 --- a/src/zscanner/tests/data/22_HINFO.out +++ b/tests/zscanner/data/22_HINFO.out diff --git a/src/zscanner/tests/data/23_MINFO.in b/tests/zscanner/data/23_MINFO.in index 7b34c6008..7b34c6008 100644 --- a/src/zscanner/tests/data/23_MINFO.in +++ b/tests/zscanner/data/23_MINFO.in diff --git a/src/zscanner/tests/data/23_MINFO.out b/tests/zscanner/data/23_MINFO.out index 8154c0c25..8154c0c25 100644 --- a/src/zscanner/tests/data/23_MINFO.out +++ b/tests/zscanner/data/23_MINFO.out diff --git a/src/zscanner/tests/data/24_RP.in b/tests/zscanner/data/24_RP.in index a70d7926c..a70d7926c 100644 --- a/src/zscanner/tests/data/24_RP.in +++ b/tests/zscanner/data/24_RP.in diff --git a/src/zscanner/tests/data/24_RP.out b/tests/zscanner/data/24_RP.out index d13b1ba82..d13b1ba82 100644 --- a/src/zscanner/tests/data/24_RP.out +++ b/tests/zscanner/data/24_RP.out diff --git a/src/zscanner/tests/data/25_SOA.in b/tests/zscanner/data/25_SOA.in index bf093d47e..bf093d47e 100644 --- a/src/zscanner/tests/data/25_SOA.in +++ b/tests/zscanner/data/25_SOA.in diff --git a/src/zscanner/tests/data/25_SOA.out b/tests/zscanner/data/25_SOA.out index f65844217..f65844217 100644 --- a/src/zscanner/tests/data/25_SOA.out +++ b/tests/zscanner/data/25_SOA.out diff --git a/src/zscanner/tests/data/26_SRV.in b/tests/zscanner/data/26_SRV.in index 001e1e654..001e1e654 100644 --- a/src/zscanner/tests/data/26_SRV.in +++ b/tests/zscanner/data/26_SRV.in diff --git a/src/zscanner/tests/data/26_SRV.out b/tests/zscanner/data/26_SRV.out index eadb80413..eadb80413 100644 --- a/src/zscanner/tests/data/26_SRV.out +++ b/tests/zscanner/data/26_SRV.out diff --git a/src/zscanner/tests/data/27_NAPTR.in b/tests/zscanner/data/27_NAPTR.in index 44fd34608..44fd34608 100644 --- a/src/zscanner/tests/data/27_NAPTR.in +++ b/tests/zscanner/data/27_NAPTR.in diff --git a/src/zscanner/tests/data/27_NAPTR.out b/tests/zscanner/data/27_NAPTR.out index cc34e26fd..cc34e26fd 100644 --- a/src/zscanner/tests/data/27_NAPTR.out +++ b/tests/zscanner/data/27_NAPTR.out diff --git a/src/zscanner/tests/data/28_TYPE.in b/tests/zscanner/data/28_TYPE.in index f8189e86d..f8189e86d 100644 --- a/src/zscanner/tests/data/28_TYPE.in +++ b/tests/zscanner/data/28_TYPE.in diff --git a/src/zscanner/tests/data/28_TYPE.out b/tests/zscanner/data/28_TYPE.out index 0aa409af1..0aa409af1 100644 --- a/src/zscanner/tests/data/28_TYPE.out +++ b/tests/zscanner/data/28_TYPE.out diff --git a/src/zscanner/tests/data/29_CERT.in b/tests/zscanner/data/29_CERT.in index ee70ce24a..ee70ce24a 100644 --- a/src/zscanner/tests/data/29_CERT.in +++ b/tests/zscanner/data/29_CERT.in diff --git a/src/zscanner/tests/data/29_CERT.out b/tests/zscanner/data/29_CERT.out index da2c89771..da2c89771 100644 --- a/src/zscanner/tests/data/29_CERT.out +++ b/tests/zscanner/data/29_CERT.out diff --git a/src/zscanner/tests/data/30_KEY.in b/tests/zscanner/data/30_KEY.in index 263fa0347..263fa0347 100644 --- a/src/zscanner/tests/data/30_KEY.in +++ b/tests/zscanner/data/30_KEY.in diff --git a/src/zscanner/tests/data/30_KEY.out b/tests/zscanner/data/30_KEY.out index 1ec998b17..1ec998b17 100644 --- a/src/zscanner/tests/data/30_KEY.out +++ b/tests/zscanner/data/30_KEY.out diff --git a/src/zscanner/tests/data/31_DNSKEY.in b/tests/zscanner/data/31_DNSKEY.in index 871de97e7..871de97e7 100644 --- a/src/zscanner/tests/data/31_DNSKEY.in +++ b/tests/zscanner/data/31_DNSKEY.in diff --git a/src/zscanner/tests/data/31_DNSKEY.out b/tests/zscanner/data/31_DNSKEY.out index fa034c5dd..fa034c5dd 100644 --- a/src/zscanner/tests/data/31_DNSKEY.out +++ b/tests/zscanner/data/31_DNSKEY.out diff --git a/src/zscanner/tests/data/32_APL.in b/tests/zscanner/data/32_APL.in index ea9a74717..ea9a74717 100644 --- a/src/zscanner/tests/data/32_APL.in +++ b/tests/zscanner/data/32_APL.in diff --git a/src/zscanner/tests/data/32_APL.out b/tests/zscanner/data/32_APL.out index 50ec10143..50ec10143 100644 --- a/src/zscanner/tests/data/32_APL.out +++ b/tests/zscanner/data/32_APL.out diff --git a/src/zscanner/tests/data/33_DS.in b/tests/zscanner/data/33_DS.in index a5d805c3a..a5d805c3a 100644 --- a/src/zscanner/tests/data/33_DS.in +++ b/tests/zscanner/data/33_DS.in diff --git a/src/zscanner/tests/data/33_DS.out b/tests/zscanner/data/33_DS.out index 2257119a7..2257119a7 100644 --- a/src/zscanner/tests/data/33_DS.out +++ b/tests/zscanner/data/33_DS.out diff --git a/src/zscanner/tests/data/34_SSHFP.in b/tests/zscanner/data/34_SSHFP.in index 89c4de3da..89c4de3da 100644 --- a/src/zscanner/tests/data/34_SSHFP.in +++ b/tests/zscanner/data/34_SSHFP.in diff --git a/src/zscanner/tests/data/34_SSHFP.out b/tests/zscanner/data/34_SSHFP.out index da8ce6d8e..da8ce6d8e 100644 --- a/src/zscanner/tests/data/34_SSHFP.out +++ b/tests/zscanner/data/34_SSHFP.out diff --git a/src/zscanner/tests/data/35_IPSECKEY.in b/tests/zscanner/data/35_IPSECKEY.in index dc56bd715..dc56bd715 100644 --- a/src/zscanner/tests/data/35_IPSECKEY.in +++ b/tests/zscanner/data/35_IPSECKEY.in diff --git a/src/zscanner/tests/data/35_IPSECKEY.out b/tests/zscanner/data/35_IPSECKEY.out index 718ce22f7..718ce22f7 100644 --- a/src/zscanner/tests/data/35_IPSECKEY.out +++ b/tests/zscanner/data/35_IPSECKEY.out diff --git a/src/zscanner/tests/data/36_RRSIG.in b/tests/zscanner/data/36_RRSIG.in index e970fc513..e970fc513 100644 --- a/src/zscanner/tests/data/36_RRSIG.in +++ b/tests/zscanner/data/36_RRSIG.in diff --git a/src/zscanner/tests/data/36_RRSIG.out b/tests/zscanner/data/36_RRSIG.out index b3d48be8d..b3d48be8d 100644 --- a/src/zscanner/tests/data/36_RRSIG.out +++ b/tests/zscanner/data/36_RRSIG.out diff --git a/src/zscanner/tests/data/37_NSEC.in b/tests/zscanner/data/37_NSEC.in index 1efa4ea4b..1efa4ea4b 100644 --- a/src/zscanner/tests/data/37_NSEC.in +++ b/tests/zscanner/data/37_NSEC.in diff --git a/src/zscanner/tests/data/37_NSEC.out b/tests/zscanner/data/37_NSEC.out index 7a62def60..7a62def60 100644 --- a/src/zscanner/tests/data/37_NSEC.out +++ b/tests/zscanner/data/37_NSEC.out diff --git a/src/zscanner/tests/data/38_DHCID.in b/tests/zscanner/data/38_DHCID.in index 4c0642a9b..4c0642a9b 100644 --- a/src/zscanner/tests/data/38_DHCID.in +++ b/tests/zscanner/data/38_DHCID.in diff --git a/src/zscanner/tests/data/38_DHCID.out b/tests/zscanner/data/38_DHCID.out index 8dc8ec915..8dc8ec915 100644 --- a/src/zscanner/tests/data/38_DHCID.out +++ b/tests/zscanner/data/38_DHCID.out diff --git a/src/zscanner/tests/data/39_NSEC3.in b/tests/zscanner/data/39_NSEC3.in index cadbfa9d3..cadbfa9d3 100644 --- a/src/zscanner/tests/data/39_NSEC3.in +++ b/tests/zscanner/data/39_NSEC3.in diff --git a/src/zscanner/tests/data/39_NSEC3.out b/tests/zscanner/data/39_NSEC3.out index 1aaec4f35..1aaec4f35 100644 --- a/src/zscanner/tests/data/39_NSEC3.out +++ b/tests/zscanner/data/39_NSEC3.out diff --git a/src/zscanner/tests/data/40_NSEC3PARAM.in b/tests/zscanner/data/40_NSEC3PARAM.in index 694e3f730..694e3f730 100644 --- a/src/zscanner/tests/data/40_NSEC3PARAM.in +++ b/tests/zscanner/data/40_NSEC3PARAM.in diff --git a/src/zscanner/tests/data/40_NSEC3PARAM.out b/tests/zscanner/data/40_NSEC3PARAM.out index 83b9bb19e..83b9bb19e 100644 --- a/src/zscanner/tests/data/40_NSEC3PARAM.out +++ b/tests/zscanner/data/40_NSEC3PARAM.out diff --git a/src/zscanner/tests/data/41_TLSA.in b/tests/zscanner/data/41_TLSA.in index 927498e53..927498e53 100644 --- a/src/zscanner/tests/data/41_TLSA.in +++ b/tests/zscanner/data/41_TLSA.in diff --git a/src/zscanner/tests/data/41_TLSA.out b/tests/zscanner/data/41_TLSA.out index 6f5b6a154..6f5b6a154 100644 --- a/src/zscanner/tests/data/41_TLSA.out +++ b/tests/zscanner/data/41_TLSA.out diff --git a/src/zscanner/tests/data/42_LOC.in b/tests/zscanner/data/42_LOC.in index 9eaae1dd6..9eaae1dd6 100644 --- a/src/zscanner/tests/data/42_LOC.in +++ b/tests/zscanner/data/42_LOC.in diff --git a/src/zscanner/tests/data/42_LOC.out b/tests/zscanner/data/42_LOC.out index 730cc3b9f..730cc3b9f 100644 --- a/src/zscanner/tests/data/42_LOC.out +++ b/tests/zscanner/data/42_LOC.out diff --git a/src/zscanner/tests/data/43_EUI48.in b/tests/zscanner/data/43_EUI48.in index a2abbec5c..a2abbec5c 100644 --- a/src/zscanner/tests/data/43_EUI48.in +++ b/tests/zscanner/data/43_EUI48.in diff --git a/src/zscanner/tests/data/43_EUI48.out b/tests/zscanner/data/43_EUI48.out index a54a31472..a54a31472 100644 --- a/src/zscanner/tests/data/43_EUI48.out +++ b/tests/zscanner/data/43_EUI48.out diff --git a/src/zscanner/tests/data/44_EUI64.in b/tests/zscanner/data/44_EUI64.in index 10f6346cc..10f6346cc 100644 --- a/src/zscanner/tests/data/44_EUI64.in +++ b/tests/zscanner/data/44_EUI64.in diff --git a/src/zscanner/tests/data/44_EUI64.out b/tests/zscanner/data/44_EUI64.out index 4cce5f532..4cce5f532 100644 --- a/src/zscanner/tests/data/44_EUI64.out +++ b/tests/zscanner/data/44_EUI64.out diff --git a/src/zscanner/tests/data/45_NID.in b/tests/zscanner/data/45_NID.in index a85f9c350..a85f9c350 100644 --- a/src/zscanner/tests/data/45_NID.in +++ b/tests/zscanner/data/45_NID.in diff --git a/src/zscanner/tests/data/45_NID.out b/tests/zscanner/data/45_NID.out index a2bfb4c44..a2bfb4c44 100644 --- a/src/zscanner/tests/data/45_NID.out +++ b/tests/zscanner/data/45_NID.out diff --git a/src/zscanner/tests/data/46_L32.in b/tests/zscanner/data/46_L32.in index 866e95394..866e95394 100644 --- a/src/zscanner/tests/data/46_L32.in +++ b/tests/zscanner/data/46_L32.in diff --git a/src/zscanner/tests/data/46_L32.out b/tests/zscanner/data/46_L32.out index e9c77b5f6..e9c77b5f6 100644 --- a/src/zscanner/tests/data/46_L32.out +++ b/tests/zscanner/data/46_L32.out diff --git a/src/zscanner/tests/data/47_L64.in b/tests/zscanner/data/47_L64.in index b4aabf370..b4aabf370 100644 --- a/src/zscanner/tests/data/47_L64.in +++ b/tests/zscanner/data/47_L64.in diff --git a/src/zscanner/tests/data/47_L64.out b/tests/zscanner/data/47_L64.out index 106ee588b..106ee588b 100644 --- a/src/zscanner/tests/data/47_L64.out +++ b/tests/zscanner/data/47_L64.out diff --git a/src/zscanner/tests/data/48_LP.in b/tests/zscanner/data/48_LP.in index bc537d0ea..bc537d0ea 100644 --- a/src/zscanner/tests/data/48_LP.in +++ b/tests/zscanner/data/48_LP.in diff --git a/src/zscanner/tests/data/48_LP.out b/tests/zscanner/data/48_LP.out index 4961c7e90..4961c7e90 100644 --- a/src/zscanner/tests/data/48_LP.out +++ b/tests/zscanner/data/48_LP.out diff --git a/src/zscanner/tests/data/49_CDS.in b/tests/zscanner/data/49_CDS.in index 7b6c3477e..7b6c3477e 100644 --- a/src/zscanner/tests/data/49_CDS.in +++ b/tests/zscanner/data/49_CDS.in diff --git a/src/zscanner/tests/data/49_CDS.out b/tests/zscanner/data/49_CDS.out index de4072253..de4072253 100644 --- a/src/zscanner/tests/data/49_CDS.out +++ b/tests/zscanner/data/49_CDS.out diff --git a/src/zscanner/tests/data/50_CDNSKEY.in b/tests/zscanner/data/50_CDNSKEY.in index dc91462d8..dc91462d8 100644 --- a/src/zscanner/tests/data/50_CDNSKEY.in +++ b/tests/zscanner/data/50_CDNSKEY.in diff --git a/src/zscanner/tests/data/50_CDNSKEY.out b/tests/zscanner/data/50_CDNSKEY.out index 31003139b..31003139b 100644 --- a/src/zscanner/tests/data/50_CDNSKEY.out +++ b/tests/zscanner/data/50_CDNSKEY.out diff --git a/src/zscanner/tests/data/51_URI.in b/tests/zscanner/data/51_URI.in index 8d18f4272..8d18f4272 100644 --- a/src/zscanner/tests/data/51_URI.in +++ b/tests/zscanner/data/51_URI.in diff --git a/src/zscanner/tests/data/51_URI.out b/tests/zscanner/data/51_URI.out index 9dcf93395..9dcf93395 100644 --- a/src/zscanner/tests/data/51_URI.out +++ b/tests/zscanner/data/51_URI.out diff --git a/src/zscanner/tests/data/52_CAA.in b/tests/zscanner/data/52_CAA.in index 7043ce560..7043ce560 100644 --- a/src/zscanner/tests/data/52_CAA.in +++ b/tests/zscanner/data/52_CAA.in diff --git a/src/zscanner/tests/data/52_CAA.out b/tests/zscanner/data/52_CAA.out index e5eefdf3e..e5eefdf3e 100644 --- a/src/zscanner/tests/data/52_CAA.out +++ b/tests/zscanner/data/52_CAA.out diff --git a/src/zscanner/tests/data/includes/include1 b/tests/zscanner/data/includes/include1 index 9de185968..9de185968 100644 --- a/src/zscanner/tests/data/includes/include1 +++ b/tests/zscanner/data/includes/include1 diff --git a/src/zscanner/tests/data/includes/include2 b/tests/zscanner/data/includes/include2 index 1e14e9601..1e14e9601 100644 --- a/src/zscanner/tests/data/includes/include2 +++ b/tests/zscanner/data/includes/include2 diff --git a/src/zscanner/tests/data/includes/include3 b/tests/zscanner/data/includes/include3 index e69de29bb..e69de29bb 100644 --- a/src/zscanner/tests/data/includes/include3 +++ b/tests/zscanner/data/includes/include3 diff --git a/src/zscanner/tests/data/includes/include4 b/tests/zscanner/data/includes/include4 index 7e8d5e29e..7e8d5e29e 100644 --- a/src/zscanner/tests/data/includes/include4 +++ b/tests/zscanner/data/includes/include4 diff --git a/src/zscanner/tests/data/includes/include5 b/tests/zscanner/data/includes/include5 index ac98e01b6..ac98e01b6 100644 --- a/src/zscanner/tests/data/includes/include5 +++ b/tests/zscanner/data/includes/include5 diff --git a/src/zscanner/tests/data/includes/include6 b/tests/zscanner/data/includes/include6 index b5e8cb84b..b5e8cb84b 100644 --- a/src/zscanner/tests/data/includes/include6 +++ b/tests/zscanner/data/includes/include6 diff --git a/src/zscanner/tests/processing.c b/tests/zscanner/processing.c index 26bfa5cf0..ab2261655 100644 --- a/src/zscanner/tests/processing.c +++ b/tests/zscanner/processing.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2011 CZ.NIC, z.s.p.o. <knot-dns@labs.nic.cz> +/* Copyright (C) 2018 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 @@ -15,10 +15,13 @@ */ #include <inttypes.h> +#include <stdlib.h> #include <stdio.h> +#include <time.h> -#include "tests/processing.h" -#include "scanner.h" +#include "zscanner/scanner.h" +#include "zscanner/functions.c" +#include "zscanner/processing.h" #include "libknot/descriptor.c" const char *separator = "------\n"; @@ -112,3 +115,59 @@ void test_process_record(zs_scanner_t *s) printf("\n%s", separator); fflush(stdout); } + +int test_date_to_timestamp(void) +{ + time_t ref_timestamp, max_timestamp; + uint32_t test_timestamp; + uint8_t buffer[16]; + uint64_t val1, val2; // For time_t type unification. + struct tm tm; + + // Set UTC for strftime. + putenv("TZ=UTC"); + tzset(); + + // Get maximal allowed timestamp. + strptime("21051231235959", "%Y%m%d%H%M%S", &tm); + max_timestamp = mktime(&tm); + + // Testing loop over whole input interval. + for (ref_timestamp = 0; + ref_timestamp < max_timestamp; + ref_timestamp += 1) { + struct tm result; + // Get reference (correct) timestamp. + strftime((char*)buffer, sizeof(buffer), "%Y%m%d%H%M%S", + gmtime_r(&ref_timestamp, &result)); + + // Get testing timestamp. + test_timestamp = 0U; // prevents Wunitialized + date_to_timestamp(buffer, &test_timestamp); + + // Some continuous loging. + if (ref_timestamp % 10000000 == 0) { + val1 = ref_timestamp; + printf("%s = %"PRIu64"\n", buffer, val1); + } + + // Comparing results. + if (ref_timestamp != test_timestamp) { + val1 = ref_timestamp; + + if (ref_timestamp > test_timestamp) { + val2 = ref_timestamp - test_timestamp; + printf("%s = %"PRIu64", in - out = %"PRIu64"\n", + buffer, val1, val2); + } else { + val2 = test_timestamp - ref_timestamp; + printf("%s = %"PRIu64", out - in = %"PRIu64"\n", + buffer, val1, val2); + } + + return -1; + } + } + + return 0; +} diff --git a/src/zscanner/tests/processing.h b/tests/zscanner/processing.h index 27489bf1a..f3a7d196a 100644 --- a/src/zscanner/tests/processing.h +++ b/tests/zscanner/processing.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2017 CZ.NIC, z.s.p.o. <knot-dns@labs.nic.cz> +/* Copyright (C) 2018 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 @@ -13,14 +13,6 @@ You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ -/*! - * \file - * - * \brief Zone scanner test functions. - * - * \addtogroup zone_scanner_test - * @{ - */ #pragma once @@ -34,4 +26,4 @@ void test_process_error(zs_scanner_t *scanner); void test_process_record(zs_scanner_t *scanner); -/*! @} */ +int test_date_to_timestamp(void); diff --git a/src/zscanner/tests/unittests.in b/tests/zscanner/test_zscanner.in index a3f27f806..a1443e74e 100644 --- a/src/zscanner/tests/unittests.in +++ b/tests/zscanner/test_zscanner.in @@ -1,9 +1,9 @@ #!/bin/sh -SOURCE=@top_srcdir@/src/zscanner/tests -BUILD=@top_builddir@/src/zscanner/tests +SOURCE=@top_srcdir@/tests/zscanner +BUILD=@top_builddir@/tests/zscanner -. @top_srcdir@/libtap/tap/libtap.sh +. @top_srcdir@/tests/_libtap/tap/libtap.sh cd "$BUILD" @@ -25,7 +25,6 @@ for case in $(cat "$SOURCE"/TESTS); do fileout="$TMPDIR"/"$case".out sed -e "s|@TMPDIR@|$TMPDIR|;" < "$casein" > "$filein" - diag $(ls "$filein") "$ZSCANNER_TOOL" -m 2 . "$filein" > "$fileout" diff --git a/src/zscanner/tests/zscanner-tool.c b/tests/zscanner/zscanner-tool.c index e3f9837e5..a8865616a 100644 --- a/src/zscanner/tests/zscanner-tool.c +++ b/tests/zscanner/zscanner-tool.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2017 CZ.NIC, z.s.p.o. <knot-dns@labs.nic.cz> +/* Copyright (C) 2018 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 @@ -20,9 +20,8 @@ #include <stdio.h> #include <stdlib.h> -#include "tests/processing.h" -#include "tests/tests.h" -#include "scanner.h" +#include "zscanner/processing.h" +#include "zscanner/scanner.h" #define DEFAULT_MODE 1 #define DEFAULT_CLASS 1 @@ -31,7 +30,7 @@ static void *timestamp_worker(void *data) { int *ret = (int *)data; - *ret = test__date_to_timestamp(); + *ret = test_date_to_timestamp(); return NULL; } |