chiark / gitweb /
regress: Reorganise r1test and make1fuzz some more
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 27 Nov 2016 15:20:37 +0000 (15:20 +0000)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Thu, 11 Jun 2020 15:13:02 +0000 (16:13 +0100)
We are going to want make1fuzz to make the raw fuzzer input too.
That's done by the playback programs, so we need to call them.

This means it needs to make a copy of the syscall stream made by
playback_prepare.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
regress/make1fuzz
regress/r1test
regress/shlib

index a7a08f250dc2c60001d4860e84600a062eb18b25..a45c24ba9a0f7bc77f8fcc62664f13450535129f 100755 (executable)
@@ -23,7 +23,7 @@ if test ! -e $playback; then
        fuzzout_complete
 fi
 
-playback_execute_callback () {
+playback_execute_hook () {
        set "${program}_fuzz" "$@"
 
        printf "%d\n" "$#"
@@ -31,6 +31,9 @@ playback_execute_callback () {
                printf "%d\n" "${#a}"
                printf "%s\n" "$a"
        done
+
+       cat <&4 >"$ofuzz.sys.tmp"
+       exec 4<$ofuzz.sys.tmp
 }
 playback_execute
 
@@ -44,6 +47,6 @@ else
 fi
 echo
 
-cat <&4
+cat $ofuzz.sys.tmp
 
 fuzzout_complete
index 74d7df2a9ce35b3ce63f319633d2a86f69141911..591369c4d1e9ccc357bfe9c90b93d52e0cecad21 100755 (executable)
@@ -51,14 +51,7 @@ then
        exit
 fi
 
-playback_execute_callback () {
-       set +e
-       ADNS_TEST_REPORT_FD=3 ADNS_TEST_IN_FD=4 \
-        3>>"$ocase.report" 4<&4 >"$ocase.out" 2>"$ocase.err" \
-        $ADNS_TEST_DEBUG $playback "$@"
-       rc=$?
-       set -e
-}
+playback_execute_hook () { :; }
 playback_execute
 
 if [ "$rc" = 5 ]
index c8d3fcc75b35f38a46bfa405f2c436c40687d07b..6f855d5fd46251620bf1010989b3839f394c0939 100644 (file)
@@ -20,6 +20,16 @@ playback_prepare () {
        playback=./${program}_playback
 }
 
+playback_execute_core () {
+       playback_execute_hook "$@"
+       set +e
+       ADNS_TEST_REPORT_FD=3 ADNS_TEST_IN_FD=4 \
+        3>>"$ocase.report" 4<&4 >"$ocase.out" 2>"$ocase.err" \
+        $ADNS_TEST_DEBUG $playback "$@"
+       rc=$?
+       set -e
+}
+
 playback_execute () {
-       playback_execute_callback $initflags"$initstring" $queryargs
+       playback_execute_core $initflags"$initstring" $queryargs
 }