bind9/bin/tests/system/Makefile.am
Michał Kępień 8fcf05a724 (Mostly) fix building bin/tests/system/rpz/dnsrps
Building the bin/tests/system/rpz/dnsrps helper binary is currently not
possible at all as the necessary compiler and linker flag definitions
are missing from bin/tests/system/Makefile.am.  Add these as a basis for
addressing the problem.

Unfortunately, this is where the "mostly" bit mentioned in this commit's
subject line comes into play.  The dlopen() parts of DNSRPS code have
not yet been reworked to use libuv's dlopen() API (uv_dlopen() etc.)
(See commit 37b9511ce1 for prior work in
this area.)  While it is certainly possible to do that, implementing
such a change without testing it in practice against a usable librpz.so
(i.e. a DNSRPS provider library) is bound to cause more trouble and
confusion than keeping the code the way it is right now.  However,
making that code buildable as-is requires linking against a C standard
library that exports the dlopen(), dlsym(), and dlclose() symbols used
by the DNSRPS dynamic loading code.  glibc 2.34+ satisfies that
requirement, but older glibc versions do not (these come with a separate
libdl shared library that would need to be linked in as well).  (Other
C standard library implementations have not been examined.)  Since the
long-term plan is to rely on libuv's dlopen() API exclusively and
detecting the shared object containing dlopen() & friends would only
pull in build system complexity for no good reason, assume for now that
the target system provides the dlopen() API in its C standard library.

This change enables the system test suite to be run for a BIND 9 build
prepared using --enable-dnsrps --enable-dnsrps-dl (on systems satisfying
the requirement explained above).  However, it is important to note that
this change by itself does NOT enable actual testing of the DNSRPS
feature as doing that requires a DNSRPS provider library to be present
on the test host.

(cherry picked from commit b396f55586)
2023-02-28 12:57:41 +01:00

255 lines
3.9 KiB
Makefile

include $(top_srcdir)/Makefile.top
EXTRA_DIST = .
# Source tarballs must not contain configure/build artifacts.
dist-hook:
git clean -n -x -d | \
grep -v "Makefile.in$$" | \
sed -n "s|^Would remove \(.*\)|$(distdir)/\1|p" | \
xargs -I{} rm -rf "{}"
SUBDIRS = dyndb/driver dlzexternal/driver hooks/driver
AM_CPPFLAGS += \
$(LIBISC_CFLAGS)
LDADD += \
$(LIBISC_LIBS)
if HAVE_PERL
check_PROGRAMS = \
feature-test \
makejournal \
pipelined/pipequeries \
resolve \
rndc/gencheck \
rpz/dnsrps \
tkey/keycreate \
tkey/keydelete
feature_test_CPPFLAGS = \
$(AM_CPPFLAGS) \
$(LIBDNS_CFLAGS)
makejournal_CPPFLAGS = \
$(AM_CPPFLAGS) \
$(LIBDNS_CFLAGS)
makejournal_LDADD = \
$(LDADD) \
$(LIBDNS_LIBS)
pipelined_pipequeries_CPPFLAGS = \
$(AM_CPPFLAGS) \
$(LIBDNS_CFLAGS)
pipelined_pipequeries_LDADD = \
$(LDADD) \
$(LIBDNS_LIBS)
resolve_CPPFLAGS = \
$(AM_CPPFLAGS) \
$(LIBISC_CFLAGS) \
$(LIBDNS_CFLAGS) \
$(LIBIRS_CFLAGS)
resolve_LDADD = $(LIBISC_LIBS) $(LIBIRS_LIBS) $(LIBDNS_LIBS)
rpz_dnsrps_CPPFLAGS = \
$(AM_CPPFLAGS) \
$(LIBDNS_CFLAGS)
rpz_dnsrps_LDADD = \
$(LDADD) \
$(LIBDNS_LIBS)
tkey_keycreate_CPPFLAGS = \
$(AM_CPPFLAGS) \
$(LIBDNS_CFLAGS)
tkey_keycreate_LDADD = \
$(LDADD) \
$(LIBDNS_LIBS)
tkey_keydelete_CPPFLAGS = \
$(AM_CPPFLAGS) \
$(LIBDNS_CFLAGS)
tkey_keydelete_LDADD = \
$(LDADD) \
$(LIBDNS_LIBS)
TESTS =
if HAVE_PERLMOD_TIME_HIRES
TESTS += serve-stale
endif HAVE_PERLMOD_TIME_HIRES
if HAVE_PERLMOD_NET_DNS
TESTS += \
rpzrecurse
endif HAVE_PERLMOD_NET_DNS
if HAVE_LIBNGHTTP2
TESTS += \
doth
endif
TESTS += \
acl \
additional \
addzone \
allow-query \
auth \
autosign \
builtin \
cacheclean \
case \
catz \
cds \
checkconf \
checknames \
checkzone \
database \
dialup \
dlzexternal \
dns64 \
dsdigest \
dupsigs \
dyndb \
ecdsa \
eddsa \
ednscompliance \
emptyzones \
enginepkcs11 \
filter-aaaa \
formerr \
geoip2 \
glue \
idna \
include-multiplecfg \
inline \
integrity \
hooks \
host \
journal \
keepalive \
keyfromlabel \
legacy \
limits \
logfileconfig \
masterfile \
masterformat \
metadata \
mirror \
mkeys \
names \
notify \
nsec3 \
nslookup \
padding \
pending \
redirect \
rndc \
rootkeysentinel \
rpz \
rrchecker \
rrl \
rrsetorder \
rsabigexponent \
runtime \
sfcache \
smartsign \
sortlist \
spf \
staticstub \
stub \
synthfromdnssec \
tkey \
tools \
transport-acl \
tsig \
tsiggss \
ttl \
unknown \
verify \
views \
wildcard \
xferquota \
zonechecks
if HAVE_LMDB
TESTS += nzd2nzf
endif # HAVE_LMDB
if HAVE_PERLMOD_NET_DNS
TESTS += \
fetchlimit \
ixfr \
nsupdate \
resolver \
statistics \
stress \
upforwd \
zero
if HAVE_DNSTAP
TESTS += dnstap
endif
if HAVE_PERLMOD_FILE_FETCH
TESTS += statschannel
endif HAVE_PERLMOD_FILE_FETCH
if HAVE_PERLMOD_DIGEST_HMAC
TESTS += xfer
endif HAVE_PERLMOD_DIGEST_HMAC
if HAVE_PERLMOD_NET_DNS_NAMESERVER
TESTS += reclimit
endif HAVE_PERLMOD_NET_DNS_NAMESERVER
endif HAVE_PERLMOD_NET_DNS
if HAVE_PYTHON
TESTS += kasp keymgr2kasp tcp pipelined
if HAVE_PYTEST
TESTS += checkds dispatch rpzextra shutdown timeouts
endif
if HAVE_PYMOD_DNS
TESTS += qmin cookie
if HAVE_PERLMOD_NET_DNS
TESTS += digdelv dnssec forward
if HAVE_PERLMOD_NET_DNS_NAMESERVER
TESTS += chain
endif HAVE_PERLMOD_NET_DNS_NAMESERVER
endif HAVE_PERLMOD_NET_DNS
endif HAVE_PYMOD_DNS
endif HAVE_PYTHON
else !HAVE_PERL
check:
echo Perl is not available, no tests were ran
exit 1
endif !HAVE_PERL
LOG_DRIVER_V = $(LOG_DRIVER_V_@AM_V@)
LOG_DRIVER_V_ = $(LOG_DRIVER_V_@AM_DEFAULT_V@)
LOG_DRIVER_V_0 = --verbose no
LOG_DRIVER_V_1 = --verbose yes
LOG_DRIVER = $(srcdir)/custom-test-driver
AM_LOG_DRIVER_FLAGS = $(LOG_DRIVER_V)
LOG_COMPILER = $(builddir)/run.sh
AM_LOG_FLAGS = -r
$(TESTS): run.sh
test-local: check