From e45be9d1349d4feabcb53cbac514a20e76f1a8e3 Mon Sep 17 00:00:00 2001 From: Evan Hunt Date: Fri, 15 May 2020 12:57:18 -0700 Subject: [PATCH 1/2] move wire_test back to bin/tests, no longer dependent on dnstap wire_test is not only used by the dnstap system test, but also in fuzz testing. it doesn't need to be installed, but it's useful to have it built when BIND is. this commit moves it back from bin/tests/system to bin/tests, as a noinst_PROGRAM so that it's built by "make all" but not installed. --- bin/tests/Makefile.am | 12 ++++++++++++ bin/tests/system/Makefile.am | 12 ------------ bin/tests/system/conf.sh.in | 2 +- bin/tests/{system => }/wire_test.c | 0 util/copyrights | 2 +- 5 files changed, 14 insertions(+), 14 deletions(-) rename bin/tests/{system => }/wire_test.c (100%) diff --git a/bin/tests/Makefile.am b/bin/tests/Makefile.am index d4008c0dd0..fc017eb1f2 100644 --- a/bin/tests/Makefile.am +++ b/bin/tests/Makefile.am @@ -1 +1,13 @@ +include $(top_srcdir)/Makefile.top + SUBDIRS = system + +noinst_PROGRAMS = wire_test + +AM_CPPFLAGS += \ + $(LIBISC_CFLAGS) \ + $(LIBDNS_CFLAGS) + +LDADD = \ + $(LIBISC_LIBS) \ + $(LIBDNS_LIBS) diff --git a/bin/tests/system/Makefile.am b/bin/tests/system/Makefile.am index c107e2853a..003d8698a8 100644 --- a/bin/tests/system/Makefile.am +++ b/bin/tests/system/Makefile.am @@ -55,18 +55,6 @@ tkey_keydelete_LDADD = \ $(LDADD) \ $(LIBDNS_LIBS) -if HAVE_DNSTAP -check_PROGRAMS += wire_test - -wire_test_CPPFLAGS = \ - $(AM_CPPFLAGS) \ - $(LIBDNS_CFLAGS) - -wire_test_LDADD = \ - $(LDADD) \ - $(LIBDNS_LIBS) -endif HAVE_DNSTAP - TESTS = \ acl \ additional \ diff --git a/bin/tests/system/conf.sh.in b/bin/tests/system/conf.sh.in index 4088fb4411..552b7a0ede 100644 --- a/bin/tests/system/conf.sh.in +++ b/bin/tests/system/conf.sh.in @@ -61,7 +61,7 @@ SETTIME=$TOP_BUILDDIR/bin/dnssec/dnssec-settime SIGNER=$TOP_BUILDDIR/bin/dnssec/dnssec-signzone TSIGKEYGEN=$TOP_BUILDDIR/bin/confgen/tsig-keygen VERIFY=$TOP_BUILDDIR/bin/dnssec/dnssec-verify -WIRETEST=$TOP_BUILDDIR/bin/tests/system/wire_test +WIRETEST=$TOP_BUILDDIR/bin/tests/wire_test BIGKEY=$TOP_BUILDDIR/bin/tests/system/rsabigexponent/bigkey GENCHECK=$TOP_BUILDDIR/bin/tests/system/rndc/gencheck diff --git a/bin/tests/system/wire_test.c b/bin/tests/wire_test.c similarity index 100% rename from bin/tests/system/wire_test.c rename to bin/tests/wire_test.c diff --git a/util/copyrights b/util/copyrights index e7a7acee61..35273cb4f8 100644 --- a/util/copyrights +++ b/util/copyrights @@ -929,7 +929,6 @@ ./bin/tests/system/win32/pipequeries.vcxproj.filters.in X 2016,2018,2019,2020 ./bin/tests/system/win32/pipequeries.vcxproj.in X 2016,2017,2018,2019,2020 ./bin/tests/system/win32/pipequeries.vcxproj.user X 2016,2018,2019,2020 -./bin/tests/system/wire_test.c C 2020 ./bin/tests/system/xfer/ans5/badkeydata X 2011,2018,2019,2020 ./bin/tests/system/xfer/ans5/badmessageid X 2020 ./bin/tests/system/xfer/ans5/goodaxfr X 2011,2018,2019,2020 @@ -981,6 +980,7 @@ ./bin/tests/win32/timer_test.vcxproj.filters.in X 2013,2015,2018,2019,2020 ./bin/tests/win32/timer_test.vcxproj.in X 2013,2015,2016,2017,2018,2019,2020 ./bin/tests/win32/timer_test.vcxproj.user X 2013,2018,2019,2020 +./bin/tests/wire_test.c C 1999,2000,2001,2004,2005,2007,2015,2016,2018,2019,2020 ./bin/tools/arpaname.c C 2009,2015,2016,2018,2019,2020 ./bin/tools/arpaname.rst RST 2020 ./bin/tools/dnstap-read.c C 2015,2016,2017,2018,2019,2020 From 93d63cd9239aee3aa321d6dbb5726d48b0f07e7a Mon Sep 17 00:00:00 2001 From: Evan Hunt Date: Fri, 15 May 2020 13:10:36 -0700 Subject: [PATCH 2/2] incidental fix: reduce a long timeout in dnstap test the dnstap test was pausing for 20 seconds to search for a string in named.run, which only appears if named is built with --enable-developer or --enable-querytrace. --- bin/tests/system/dnstap/tests.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/tests/system/dnstap/tests.sh b/bin/tests/system/dnstap/tests.sh index a666b7e01f..d8901db657 100644 --- a/bin/tests/system/dnstap/tests.sh +++ b/bin/tests/system/dnstap/tests.sh @@ -44,11 +44,11 @@ if [ $ret != 0 ]; then echo_i "failed"; fi status=`expr $status + $ret` # both the 'a.example/A' lookup and the './NS' lookup to ns1 -# need tocomplete before reopening/rolling for the counts to +# need to complete before reopening/rolling for the counts to # be correct. $DIG $DIGOPTS @10.53.0.3 a.example > dig.out -wait_for_log 20 "(./NS): query_reset" ns1/named.run || true +wait_for_log 20 "(.): reset client" ns1/named.run || true # check three different dnstap reopen/roll methods: # ns1: dnstap-reopen; ns2: dnstap -reopen; ns3: dnstap -roll