From 6600556f51778d83d6f1b42c731db06d275d77ed Mon Sep 17 00:00:00 2001 From: Daniel Thayer Date: Mon, 23 Apr 2018 12:31:59 -0500 Subject: [PATCH] Improve reliability of the logging rotate.bro test Occasionally a few lines in the first part of the output file were not in the expected order (this seems to be caused by each line in the output being created by a process that is run in the background but bro doesn't wait for it to finish). Fixed by sorting the output. --- testing/btest/scripts/base/frameworks/logging/rotate.bro | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/testing/btest/scripts/base/frameworks/logging/rotate.bro b/testing/btest/scripts/base/frameworks/logging/rotate.bro index 86f659c193..501c0db8ea 100644 --- a/testing/btest/scripts/base/frameworks/logging/rotate.bro +++ b/testing/btest/scripts/base/frameworks/logging/rotate.bro @@ -1,5 +1,6 @@ # -# @TEST-EXEC: bro -b -r ${TRACES}/rotation.trace %INPUT 2>&1 | grep "test" >out +# @TEST-EXEC: bro -b -r ${TRACES}/rotation.trace %INPUT >bro.out 2>&1 +# @TEST-EXEC: grep "test" bro.out | sort >out # @TEST-EXEC: for i in `ls test.*.log | sort`; do printf '> %s\n' $i; cat $i; done >>out # @TEST-EXEC: btest-diff out