btest/core: Add event-trace test

This commit is contained in:
Arne Welzel 2025-05-19 18:09:46 +02:00
parent eeb08f6ba8
commit 000cc50813
2 changed files with 22 additions and 0 deletions

View file

@ -0,0 +1 @@
### BTest baseline data generated by btest-diff. Do not edit. Use "btest -U/-u" to update. Requires BTest >= 0.63.

View file

@ -0,0 +1,21 @@
# @TEST-DOC: Verify the --event-trace feature works and produces the same logs as when reading from a pcap.
#
# Trace files produced with ZAM don't work - issue #4478
#
# @TEST-REQUIRES: test "${ZEEK_ZAM}" != "1"
#
# @TEST-EXEC: zeek --event-trace trace.zeek -b -r $TRACES/http/get.trace %INPUT
# @TEST-EXEC: mkdir pcap-logs
# @TEST-EXEC: zeek-cut -m < http.log > pcap-logs/http.log
# @TEST-EXEC: rm -v *.log
#
# @TEST-EXEC: zeek -b --parse-only %INPUT trace.zeek
# @TEST-EXEC: zeek -b %INPUT trace.zeek
# @TEST-EXEC: mkdir trace-logs
# @TEST-EXEC: zeek-cut -m < http.log > trace-logs/http.log
# @TEST-EXEC: rm -v *.log
#
# @TEST-EXEC: diff pcap-logs/http.log trace-logs/http.log
# @TEST-EXEC: btest-diff .stderr
@load base/protocols/http