chiark / gitweb /
regress: make1fuzz: Make fuzzraw-* too
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 27 Nov 2016 16:26:48 +0000 (16:26 +0000)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Thu, 11 Jun 2020 15:13:02 +0000 (16:13 +0100)
And clean and .gitignore them.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
.gitignore
regress/make1fuzz
settings.make.in

index aaf3639454e06079e286b4b693b3d370e24727ff..89b05ff5d108521ba6ff594eed7f07a3fcad4a62 100644 (file)
@@ -37,6 +37,7 @@ regress/*_fuzz
 regress/*_fuzzraw
 regress/output-*.*
 regress/fuzz-*
+regress/fuzzraw-*
 regress/pipe.out
 regress/pipe.err
 regress/harness.h
index a45c24ba9a0f7bc77f8fcc62664f13450535129f..f6a8becd94da47852ccb14cb3a893df2f822e8da 100755 (executable)
@@ -9,21 +9,26 @@ casename="$1"
 playback_prepare
 
 ofuzz="fuzz-$casename"
+ofuzzraw="fuzzraw-$casename"
 
 rm -f "$ofuzz.tmp"
+rm -f "$ofuzzraw.tmp"
 exec >"$ofuzz.tmp"
+exec 6>"$ofuzzraw.tmp"
 
 fuzzout_complete () {
        mv "$ofuzz.tmp" "$ofuzz"
+       mv "$ofuzzraw.tmp" "$ofuzzraw"
        exit 0
 }
 
 if test ! -e $playback; then
        echo 0
+       echo 0 >&6
        fuzzout_complete
 fi
 
-playback_execute_hook () {
+dump_args () {
        set "${program}_fuzz" "$@"
 
        printf "%d\n" "$#"
@@ -32,21 +37,28 @@ playback_execute_hook () {
                printf "%s\n" "$a"
        done
 
+       if test -e "$case.in"
+       then
+               inputsz=$(stat -c'%s' -L "$case.in")
+               printf "%d\n" "$inputsz"
+               cat "$case.in"
+       else
+               echo 0
+       fi
+
+       echo
+}      
+
+playback_execute_hook () {
+       dump_args "$@"
+       dump_args "$@" >&6
        cat <&4 >"$ofuzz.sys.tmp"
        exec 4<$ofuzz.sys.tmp
+       ADNS_TEST_FUZZRAW_DUMP_FD=6
+       export ADNS_TEST_FUZZRAW_DUMP_FD
 }
 playback_execute
 
-if test -e "$case.in"
-then
-       inputsz=$(stat -c'%s' -L "$case.in")
-       printf "%d\n" "$inputsz"
-       cat "$case.in"
-else
-       echo 0
-fi
-echo
-
 cat $ofuzz.sys.tmp
 
 fuzzout_complete
index d69c8afc2be89f567ff3fa1bb347aa83496877e8..2d9b6d60f0a62aa5105ad91c4ce2f5a4c1642b11 100644 (file)
@@ -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-* fuzzcat.d
+               rm -f output-*.out output-*.report fuzz-* fuzzraw-* fuzzcat.d
 
 distclean:             clean
                rm -f *~ ./#*# core *.orig *.rej Makefile config.h