From 1851859ebed79a37124e7dae514e9c8eb70653aa Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Sat, 19 Nov 2016 19:30:02 +0000 Subject: [PATCH] regress: Provide fuzzcat.d Signed-off-by: Ian Jackson --- .gitignore | 1 + regress/Makefile.in | 3 +++ regress/categorizefuzz | 18 ++++++++++++++++++ settings.make.in | 2 +- 4 files changed, 23 insertions(+), 1 deletion(-) create mode 100755 regress/categorizefuzz diff --git a/.gitignore b/.gitignore index 4218eae..81aee7a 100644 --- a/.gitignore +++ b/.gitignore @@ -29,6 +29,7 @@ client/adnsresfilter client/adnsresfilter_s dynamic/Makefile dynamic/libadns.so.* +regress/fuzzcat.d regress/Makefile regress/*_record regress/*_playback diff --git a/regress/Makefile.in b/regress/Makefile.in index 3c5252f..5f87f24 100644 --- a/regress/Makefile.in +++ b/regress/Makefile.in @@ -59,6 +59,9 @@ checkfuzz: $(TARGETS) $(addprefix checkfuzz-,$(ALL_TESTS)) # this target is mostly useful as prep work for running the fuzzer; # it doesn't really test any of adns +fuzzcat.d: checkfuzz + $(srcdir)/categorizefuzz $(ALL_TESTS) + check-%: case-%.sys @srcdir=$(srcdir) $(srcdir)/r1test $* || test $$? = 5 diff --git a/regress/categorizefuzz b/regress/categorizefuzz new file mode 100755 index 0000000..5a6a623 --- /dev/null +++ b/regress/categorizefuzz @@ -0,0 +1,18 @@ +#!/bin/sh +set -e + +out=fuzzcat.d + +rm -rf "$out" +mkdir "$out" + +for case in "$@"; do + fuzz="fuzz-$case" + exec <"$fuzz" + read nargs + read arg0len + read program + program="${program##*/}" + mkdir -p "$out/$program" + ln "$fuzz" "$out/$program"/. +done diff --git a/settings.make.in b/settings.make.in index 3b1e4bd..d69c8af 100644 --- a/settings.make.in +++ b/settings.make.in @@ -29,7 +29,7 @@ clean mostlyclean: rm -f $(TARGETS) $(AUTOCSRCS) $(AUTOCHDRS) rm -f *.o *.tmp* *.so *.so.* pipe.* rm -f output-*.err output-*.leftover - rm -f output-*.out output-*.report fuzz-* + rm -f output-*.out output-*.report fuzz-* fuzzcat.d distclean: clean rm -f *~ ./#*# core *.orig *.rej Makefile config.h -- 2.30.2