... along with dns_rdataclass_fromtext and dns_rdatatype_fromtext
Most of the test binary is modified named-rrchecker. Main differences:
- reads single RR and exists
- does not refuse meta classes and rr types
We actually do have some fromtext code for meta-things so erroring out
in named-rrchecker would prevent us from testing this code.
Corpus has examples of all currently supported RR types. I did not do
any minimization.
In future use command
diff -U0 \
<(sed -n -e 's/^.*fromtext_\(.*\)(.*$/\1/p' lib/dns/code.h | \
sort) \
<(ls fuzz/dns_rdata_fromtext.in/)
to check for missing RR types.
47 lines
886 B
Makefile
47 lines
886 B
Makefile
include $(top_srcdir)/Makefile.top
|
|
|
|
AM_CPPFLAGS += \
|
|
$(LIBISC_CFLAGS) \
|
|
$(LIBDNS_CFLAGS) \
|
|
-DFUZZDIR=\"$(abs_srcdir)\"
|
|
|
|
AM_LDFLAGS += \
|
|
$(FUZZ_LDFLAGS)
|
|
|
|
LDADD += \
|
|
libfuzzmain.la \
|
|
$(LIBISC_LIBS) \
|
|
$(LIBDNS_LIBS)
|
|
|
|
check_LTLIBRARIES = libfuzzmain.la
|
|
libfuzzmain_la_SOURCES = \
|
|
fuzz.h \
|
|
main.c
|
|
|
|
check_PROGRAMS = \
|
|
dns_master_load \
|
|
dns_message_parse \
|
|
dns_name_fromtext_target \
|
|
dns_rdata_fromtext \
|
|
dns_rdata_fromwire_text \
|
|
isc_lex_getmastertoken \
|
|
isc_lex_gettoken
|
|
|
|
EXTRA_DIST = \
|
|
dns_master_load.in \
|
|
dns_message_parse.in \
|
|
dns_name_fromtext_target.in \
|
|
dns_rdata_fromtext.in \
|
|
dns_rdata_fromwire_text.in \
|
|
isc_lex_getmastertoken.in \
|
|
isc_lex_gettoken.in
|
|
|
|
TESTS = $(check_PROGRAMS)
|
|
|
|
if HAVE_FUZZ_LOG_COMPILER
|
|
LOG_COMPILER = $(srcdir)/$(FUZZ_LOG_COMPILER)
|
|
AM_LOG_FLAGS = $(srcdir)
|
|
endif HAVE_FUZZ_LOG_COMPILER
|
|
|
|
unit-local: check
|