chiark / gitweb /
regress: fuzzraw: makefile and shell script fixes
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 27 Nov 2016 22:24:34 +0000 (22:24 +0000)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Thu, 11 Jun 2020 15:13:02 +0000 (16:13 +0100)
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
regress/Makefile.in
regress/check1fuzz
regress/make1fuzz

index d378d23e1f35085a5e8d4c26ff39d46716abfa39..a212ef8402c82da363e4004b8d687e0e60d734b0 100644 (file)
@@ -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)
index 73ed172ef72854be680a2b320bc58ab175354889..1609008ceddc6866a9a910347fd100374b651e43 100755 (executable)
@@ -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
index f6a8becd94da47852ccb14cb3a893df2f822e8da..e121094b7f1b26c6c59204d3959d3db7d40ca264 100755 (executable)
@@ -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