]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Capture all fstrm_capture output
authorMichał Kępień <michal@isc.org>
Mon, 7 Aug 2023 09:26:58 +0000 (11:26 +0200)
committerMichał Kępień <michal@isc.org>
Mon, 7 Aug 2023 12:01:51 +0000 (14:01 +0200)
The fstrm_capture.out file is overwritten when the fstrm_capture utility
is restarted during the "dnstap" system test.  Use a separate output
file for each fstrm_capture instance to ensure all output produced by
that tool during the "dnstap" system test is preserved for forensic
purposes.

(cherry picked from commit bd2941fc72dc622ba28506e73c6c700099e3fb73)

bin/tests/system/dnstap/clean.sh
bin/tests/system/dnstap/tests.sh

index ff13e8d3e2f06e65e4ee29bcc13a6691deee04b2..36f1ea3bee2bd2b0ced7075d2893884eed9ac205 100644 (file)
@@ -19,7 +19,7 @@ rm -f */named.stats
 rm -f dig.out*
 rm -f dnstap.out dnstap.hex
 rm -f dnstap.out.save
-rm -f fstrm_capture.out
+rm -f fstrm_capture.out.*
 rm -f ns*/dnstap.out
 rm -f ns*/dnstap.out.save
 rm -f ns*/dnstap.out.save.?
index 11c2ceb9f0c398a308bcd027612e59487b19848c..0eb6aee2a4024028ad50bff7690e353166382438 100644 (file)
@@ -78,7 +78,7 @@ mv ns2/dnstap.out ns2/dnstap.out.save
 
 if [ -n "$FSTRM_CAPTURE" ] ; then
        $FSTRM_CAPTURE -t protobuf:dnstap.Dnstap -u ns4/dnstap.out \
-               -w dnstap.out > fstrm_capture.out 2>&1 &
+               -w dnstap.out > fstrm_capture.out.1 2>&1 &
        fstrm_capture_pid=$!
 fi
 
@@ -673,7 +673,7 @@ EOF
        mv dnstap.out dnstap.out.save
 
        $FSTRM_CAPTURE -t protobuf:dnstap.Dnstap -u ns4/dnstap.out \
-               -w dnstap.out > fstrm_capture.out 2>&1 &
+               -w dnstap.out > fstrm_capture.out.2 2>&1 &
        fstrm_capture_pid=$!
        sleep 1
        $RNDCCMD -s 10.53.0.4 dnstap -reopen | sed 's/^/ns4 /' | cat_i