From: Michał Kępień Date: Mon, 7 Aug 2023 09:26:58 +0000 (+0200) Subject: Capture all fstrm_capture output X-Git-Tag: v9.19.17~64^2~2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=bd2941fc72dc622ba28506e73c6c700099e3fb73;p=thirdparty%2Fbind9.git Capture all fstrm_capture output 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. --- diff --git a/bin/tests/system/dnstap/clean.sh b/bin/tests/system/dnstap/clean.sh index 0a0081fd947..b9e476f6616 100644 --- a/bin/tests/system/dnstap/clean.sh +++ b/bin/tests/system/dnstap/clean.sh @@ -18,7 +18,7 @@ rm -f */named.run.prev rm -f */named.stats rm -f dig.out* rm -f dnstap.* -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.? diff --git a/bin/tests/system/dnstap/tests.sh b/bin/tests/system/dnstap/tests.sh index 3336a9fe0c8..c6bad884756 100644 --- a/bin/tests/system/dnstap/tests.sh +++ b/bin/tests/system/dnstap/tests.sh @@ -79,7 +79,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 @@ -674,7 +674,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