From 09d75bbcbaf268d5c221475ef577fadc58b2cd38 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Sun, 27 Nov 2016 22:24:34 +0000 Subject: [PATCH] regress: fuzzraw: makefile and shell script fixes Signed-off-by: Ian Jackson --- regress/Makefile.in | 9 ++++++++- regress/check1fuzz | 5 ++++- regress/make1fuzz | 6 ++---- 3 files changed, 14 insertions(+), 6 deletions(-) diff --git a/regress/Makefile.in b/regress/Makefile.in index d378d23..a212ef8 100644 --- a/regress/Makefile.in +++ b/regress/Makefile.in @@ -55,7 +55,9 @@ check: $(TARGETS) $(addprefix check-,$(ALL_TESTS)) @echo @echo 'all tests passed or maybe skipped.' -checkfuzz: $(TARGETS) $(addprefix checkfuzz-,$(ALL_TESTS)) +checkfuzz: $(TARGETS) \ + $(addprefix checkfuzz-,$(ALL_TESTS)) \ + $(addprefix checkfuzzraw-,$(ALL_TESTS)) @echo @echo 'all fuzzes passed or maybe skipped.' # this target is mostly useful as prep work for running the fuzzer; @@ -70,11 +72,16 @@ check-%: case-%.sys fuzz-%: case-%.sys $(TARGETS) make1fuzz shlib srcdir=$(srcdir) $(srcdir)/make1fuzz $* +fuzzraw-%: fuzz-% + .PRECIOUS: fuzz-% checkfuzz-%: fuzz-% $(TARGETS) @srcdir=$(srcdir) $(srcdir)/check1fuzz $< || test $$? = 5 +checkfuzzraw-%: fuzzraw-% $(TARGETS) + @srcdir=$(srcdir) $(srcdir)/check1fuzz $< || test $$? = 5 + LINK_CMD= $(CC) $(LDFLAGS) $^ $(LDLIBS) -o $@ %_record: %_c.o hrecord.o hnonfuzz.o $(HARNLOBJS) diff --git a/regress/check1fuzz b/regress/check1fuzz index 73ed172..1609008 100755 --- a/regress/check1fuzz +++ b/regress/check1fuzz @@ -10,7 +10,10 @@ fuzzfile="$1" exec <"$fuzzfile" -desc="${fuzzfile#fuzz-}" +case "$fuzzfile" in +fuzz-*) desc="${fuzzfile#fuzz-}" ;; +fuzzraw-*) desc="${fuzzfile#fuzzraw-}" ;; +esac read nargs if [ "$nargs" = 0 ]; then printf "SKIPPED-$desc "; exit 5; fi diff --git a/regress/make1fuzz b/regress/make1fuzz index f6a8bec..e121094 100755 --- a/regress/make1fuzz +++ b/regress/make1fuzz @@ -29,8 +29,6 @@ if test ! -e $playback; then fi dump_args () { - set "${program}_fuzz" "$@" - printf "%d\n" "$#" for a in "$@"; do printf "%d\n" "${#a}" @@ -50,8 +48,8 @@ dump_args () { } playback_execute_hook () { - dump_args "$@" - dump_args "$@" >&6 + dump_args "${program}_fuzz" "$@" + dump_args "${program}_fuzzraw" "$@" >&6 cat <&4 >"$ofuzz.sys.tmp" exec 4<$ofuzz.sys.tmp ADNS_TEST_FUZZRAW_DUMP_FD=6 -- 2.30.2