Merge remote-tracking branch 'origin/topic/dnthayer/test-improvements'

* origin/topic/dnthayer/test-improvements:
  Fix the ip-broken-header.bro test on macOS
  Improve reliability of the logging rotate.bro test
  Improve reliability of missing-file-initially.bro test

BIT-1929 #merged
This commit is contained in:
Jon Siwek 2018-05-01 18:27:38 -05:00
commit 5572d05921
8 changed files with 24 additions and 11 deletions

View file

@ -1,4 +1,13 @@
2.5-551 | 2018-05-01 18:27:38 -0500
* Fix the ip-broken-header.bro test on macOS due to missing 'xzcat'
(Daniel Thayer)
* Improve reliability of the logging rotate.bro test (Daniel Thayer)
* Improve reliability of missing-file-initially.bro test (Daniel thayer)
2.5-547 | 2018-05-01 18:17:14 -0500 2.5-547 | 2018-05-01 18:17:14 -0500
* Update install instructions for Ubuntu 18.04 (Daniel Thayer) * Update install instructions for Ubuntu 18.04 (Daniel Thayer)

View file

@ -1 +1 @@
2.5-547 2.5-551

View file

@ -1,5 +1,5 @@
now it does input: now it does
and more! input: and more!
now it does inputstream: now it does
and more! inputstream: and more!
Streaming still works inputstream: Streaming still works

Binary file not shown.

View file

@ -1,7 +1,7 @@
# This test has a trace that was generated from fuzzing which used to cause # This test has a trace that was generated from fuzzing which used to cause
# OOB reads in Bro. It has a number of packets broken in weird ways. # OOB reads in Bro. It has a number of packets broken in weird ways.
# #
# @TEST-EXEC: xzcat $TRACES/trunc/mpls-6in6-broken.pcap.xz | bro -C -b -r - %INPUT # @TEST-EXEC: gunzip -c $TRACES/trunc/mpls-6in6-broken.pcap.gz | bro -C -b -r - %INPUT
# @TEST-EXEC: btest-diff weird.log # @TEST-EXEC: btest-diff weird.log
@load base/frameworks/notice/weird.bro @load base/frameworks/notice/weird.bro

View file

@ -4,8 +4,11 @@
# failing behavior. # failing behavior.
# @TEST-EXEC: btest-bg-run bro bro %INPUT # @TEST-EXEC: btest-bg-run bro bro %INPUT
# @TEST-EXEC: sleep 2; cp does-exist.dat does-not-exist.dat # @TEST-EXEC: sleep 10
# @TEST-EXEC: sleep 2; mv does-not-exist.dat does-not-exist-again.dat; echo "Streaming still works" >> does-not-exist-again.dat # @TEST-EXEC: mv does-exist.dat does-not-exist.dat
# @TEST-EXEC: sleep 2
# @TEST-EXEC: mv does-not-exist.dat does-not-exist-again.dat
# @TEST-EXEC: echo "Streaming still works" >> does-not-exist-again.dat
# @TEST-EXEC: btest-bg-wait -k 3 # @TEST-EXEC: btest-bg-wait -k 3
# @TEST-EXEC: btest-diff bro/.stdout # @TEST-EXEC: btest-diff bro/.stdout
# @TEST-EXEC: TEST_DIFF_CANONIFIER=$SCRIPTS/diff-sort btest-diff bro/.stderr # @TEST-EXEC: TEST_DIFF_CANONIFIER=$SCRIPTS/diff-sort btest-diff bro/.stderr
@ -30,7 +33,7 @@ type Val: record {
event line(description: Input::EventDescription, tpe: Input::Event, v: Val) event line(description: Input::EventDescription, tpe: Input::Event, v: Val)
{ {
print v$line; print fmt("%s: %s", description$name, v$line);
} }
event line2(description: Input::EventDescription, tpe: Input::Event, v: Val) event line2(description: Input::EventDescription, tpe: Input::Event, v: Val)

View file

@ -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: for i in `ls test.*.log | sort`; do printf '> %s\n' $i; cat $i; done >>out
# @TEST-EXEC: btest-diff out # @TEST-EXEC: btest-diff out