zeek/testing/btest/scripts/base/protocols/modbus/exception_handling.test
Jon Siwek defed7b6f3 Adjustments to modbus test cases.
- Added a test for binpac exception handling -- the generated code
  should use "binpac::Exception" and not "Exception" for exception
  handling logic to avoid accidental overshadowing by
  the analyzer-specific type "binpac::ModbusTCP::Exception", which
  could lead to interesting asserts being triggered in binpac.

- Update baseline for the event coverage test -- seems that more
  events get generated with working exception handling in the generated
  binpac parser code.

- Coverage baseline was giving wrong number of events covered.
2012-11-12 11:51:42 -06:00

10 lines
557 B
Text

# @TEST-EXEC: bro -r $TRACES/modbus/fuzz-72.trace
# @TEST-EXEC: btest-diff modbus.log
# @TEST-EXEC: btest-diff weird.log
# The pcap has a flow with some fuzzed modbus traffic in it that should cause
# the binpac-generated analyzer code to throw a binpac::ExceptionOutOfBound.
# This should be correctly caught as a type of binpac::Exception and the
# binpac::ModbusTCP::Exception type that's defined as part of the analyzer
# shouldn't interfere with that handling and definitely shouldn't crash bro.
# A weird is currently emitted for parsing exceptions.