mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 06:38:20 +00:00
Skip input framework entries with missing but non-optional fields
The framework so far populated data structures with missing fields even when those fields are defined without the &optional attribute. When using the attribute, such entries continue to get populated. Update tests to reflect focus on unset fields.
This commit is contained in:
parent
ef08605877
commit
937bdccab5
9 changed files with 122 additions and 59 deletions
|
@ -5,49 +5,55 @@ Description
|
|||
reader, Input::READER_ASCII
|
||||
mode, Input::REREAD
|
||||
name, ssh
|
||||
destination[left = 1], [s=<uninitialized>, ss=TEST]
|
||||
destination[left = 3], [s=TEST, ss=<uninitialized>]
|
||||
idx, A::Idx
|
||||
val, A::Val
|
||||
want_record, T
|
||||
Type, Input::EVENT_NEW
|
||||
Left, [i=3]
|
||||
Right, [s=TEST, ss=<uninitialized>]
|
||||
============EVENT============
|
||||
Description
|
||||
source, ../input.log
|
||||
reader, Input::READER_ASCII
|
||||
mode, Input::REREAD
|
||||
name, ssh
|
||||
destination[left = 4], [s=TEST, ss=TEST]
|
||||
idx, A::Idx
|
||||
val, A::Val
|
||||
want_record, T
|
||||
Type, Input::EVENT_NEW
|
||||
Left, [i=4]
|
||||
Right, [s=TEST, ss=TEST]
|
||||
============EVENT============
|
||||
Description
|
||||
source, ../input.log
|
||||
reader, Input::READER_ASCII
|
||||
mode, Input::REREAD
|
||||
name, ssh
|
||||
destination[left = 1], [s=TEST2, ss=<uninitialized>]
|
||||
idx, A::Idx
|
||||
val, A::Val
|
||||
want_record, T
|
||||
Type, Input::EVENT_NEW
|
||||
Left, [i=1]
|
||||
Right, [s=<uninitialized>, ss=TEST]
|
||||
Right, [s=TEST2, ss=<uninitialized>]
|
||||
============EVENT============
|
||||
Description
|
||||
source, ../input.log
|
||||
reader, Input::READER_ASCII
|
||||
mode, Input::REREAD
|
||||
name, ssh
|
||||
destination[left = 2], [s=<uninitialized>, ss=<uninitialized>]
|
||||
idx, A::Idx
|
||||
val, A::Val
|
||||
want_record, T
|
||||
Type, Input::EVENT_NEW
|
||||
Left, [i=2]
|
||||
Right, [s=<uninitialized>, ss=<uninitialized>]
|
||||
============EVENT============
|
||||
Description
|
||||
source, ../input.log
|
||||
reader, Input::READER_ASCII
|
||||
mode, Input::REREAD
|
||||
name, ssh
|
||||
destination[left = 1], [s=TEST, ss=<uninitialized>]
|
||||
destination[left = 4], [s=TEST2, ss=TEST2]
|
||||
idx, A::Idx
|
||||
val, A::Val
|
||||
want_record, T
|
||||
Type, Input::EVENT_CHANGED
|
||||
Left, [i=1]
|
||||
Right, [s=<uninitialized>, ss=TEST]
|
||||
Left, [i=4]
|
||||
Right, [s=TEST, ss=TEST]
|
||||
============EVENT============
|
||||
Description
|
||||
source, ../input.log
|
||||
reader, Input::READER_ASCII
|
||||
mode, Input::REREAD
|
||||
name, ssh
|
||||
destination[left = 2], [s=TEST, ss=TEST]
|
||||
idx, A::Idx
|
||||
val, A::Val
|
||||
want_record, T
|
||||
Type, Input::EVENT_CHANGED
|
||||
Left, [i=2]
|
||||
Right, [s=<uninitialized>, ss=<uninitialized>]
|
||||
|
|
|
@ -1,17 +1,21 @@
|
|||
### BTest baseline data generated by btest-diff. Do not edit. Use "btest -U/-u" to update. Requires BTest >= 0.63.
|
||||
============PREDICATE============
|
||||
Input::EVENT_NEW
|
||||
[i=1]
|
||||
[s=<uninitialized>, ss=TEST]
|
||||
============PREDICATE============
|
||||
Input::EVENT_NEW
|
||||
[i=2]
|
||||
[s=<uninitialized>, ss=<uninitialized>]
|
||||
============PREDICATE============
|
||||
Input::EVENT_CHANGED
|
||||
[i=1]
|
||||
[i=3]
|
||||
[s=TEST, ss=<uninitialized>]
|
||||
============PREDICATE============
|
||||
Input::EVENT_CHANGED
|
||||
[i=2]
|
||||
Input::EVENT_NEW
|
||||
[i=4]
|
||||
[s=TEST, ss=TEST]
|
||||
============PREDICATE============
|
||||
Input::EVENT_NEW
|
||||
[i=1]
|
||||
[s=TEST2, ss=<uninitialized>]
|
||||
============PREDICATE============
|
||||
Input::EVENT_CHANGED
|
||||
[i=4]
|
||||
[s=TEST2, ss=TEST2]
|
||||
============PREDICATE============
|
||||
Input::EVENT_REMOVED
|
||||
[i=3]
|
||||
[s=TEST, ss=<uninitialized>]
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
### BTest baseline data generated by btest-diff. Do not edit. Use "btest -U/-u" to update. Requires BTest >= 0.63.
|
||||
==========SERVERS============
|
||||
{
|
||||
[2] = [s=<uninitialized>, ss=<uninitialized>],
|
||||
[1] = [s=<uninitialized>, ss=TEST]
|
||||
[4] = [s=TEST, ss=TEST],
|
||||
[3] = [s=TEST, ss=<uninitialized>]
|
||||
}
|
||||
==========SERVERS============
|
||||
{
|
||||
[2] = [s=TEST, ss=TEST],
|
||||
[1] = [s=TEST, ss=<uninitialized>]
|
||||
[4] = [s=TEST2, ss=TEST2],
|
||||
[1] = [s=TEST2, ss=<uninitialized>]
|
||||
}
|
||||
done
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue