mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 06:38:20 +00:00

Before this patch, empty values were not hashed at all. Which had the unfortunate side-effect that e.g. the lines TEST - and - TEST have the same hash values. On re-reads that means that the change will be ignored. This is probably pretty academic, but this patch changes it and adds a testcase. Output of the reread test changes due to re-ordering of the output (probably due to the fact that the internal hash values are changed and thus transferred in a different order)
155 lines
3.8 KiB
Text
155 lines
3.8 KiB
Text
============PREDICATE============
|
|
Input::EVENT_NEW
|
|
[i=1]
|
|
[s=<uninitialized>, ss=TEST]
|
|
============PREDICATE============
|
|
Input::EVENT_NEW
|
|
[i=2]
|
|
[s=<uninitialized>, ss=<uninitialized>]
|
|
============EVENT============
|
|
Description
|
|
[source=../input.log, reader=Input::READER_ASCII, mode=Input::REREAD, name=ssh, destination={
|
|
[2] = [s=<uninitialized>, ss=<uninitialized>],
|
|
[1] = [s=<uninitialized>, ss=TEST]
|
|
}, idx=<no value description>, val=<no value description>, want_record=T, ev=line
|
|
{
|
|
print A::outfile, ============EVENT============;
|
|
print A::outfile, Description;
|
|
print A::outfile, A::description;
|
|
print A::outfile, Type;
|
|
print A::outfile, A::tpe;
|
|
print A::outfile, Left;
|
|
print A::outfile, A::left;
|
|
print A::outfile, Right;
|
|
print A::outfile, A::right;
|
|
}, pred=anonymous-function
|
|
{
|
|
print A::outfile, ============PREDICATE============;
|
|
print A::outfile, A::typ;
|
|
print A::outfile, A::left;
|
|
print A::outfile, A::right;
|
|
return (T);
|
|
}, config={
|
|
|
|
}]
|
|
Type
|
|
Input::EVENT_NEW
|
|
Left
|
|
[i=1]
|
|
Right
|
|
[s=<uninitialized>, ss=TEST]
|
|
============EVENT============
|
|
Description
|
|
[source=../input.log, reader=Input::READER_ASCII, mode=Input::REREAD, name=ssh, destination={
|
|
[2] = [s=<uninitialized>, ss=<uninitialized>],
|
|
[1] = [s=<uninitialized>, ss=TEST]
|
|
}, idx=<no value description>, val=<no value description>, want_record=T, ev=line
|
|
{
|
|
print A::outfile, ============EVENT============;
|
|
print A::outfile, Description;
|
|
print A::outfile, A::description;
|
|
print A::outfile, Type;
|
|
print A::outfile, A::tpe;
|
|
print A::outfile, Left;
|
|
print A::outfile, A::left;
|
|
print A::outfile, Right;
|
|
print A::outfile, A::right;
|
|
}, pred=anonymous-function
|
|
{
|
|
print A::outfile, ============PREDICATE============;
|
|
print A::outfile, A::typ;
|
|
print A::outfile, A::left;
|
|
print A::outfile, A::right;
|
|
return (T);
|
|
}, config={
|
|
|
|
}]
|
|
Type
|
|
Input::EVENT_NEW
|
|
Left
|
|
[i=2]
|
|
Right
|
|
[s=<uninitialized>, ss=<uninitialized>]
|
|
==========SERVERS============
|
|
{
|
|
[2] = [s=<uninitialized>, ss=<uninitialized>],
|
|
[1] = [s=<uninitialized>, ss=TEST]
|
|
}
|
|
============PREDICATE============
|
|
Input::EVENT_CHANGED
|
|
[i=1]
|
|
[s=TEST, ss=<uninitialized>]
|
|
============PREDICATE============
|
|
Input::EVENT_CHANGED
|
|
[i=2]
|
|
[s=TEST, ss=TEST]
|
|
============EVENT============
|
|
Description
|
|
[source=../input.log, reader=Input::READER_ASCII, mode=Input::REREAD, name=ssh, destination={
|
|
[2] = [s=TEST, ss=TEST],
|
|
[1] = [s=TEST, ss=<uninitialized>]
|
|
}, idx=<no value description>, val=<no value description>, want_record=T, ev=line
|
|
{
|
|
print A::outfile, ============EVENT============;
|
|
print A::outfile, Description;
|
|
print A::outfile, A::description;
|
|
print A::outfile, Type;
|
|
print A::outfile, A::tpe;
|
|
print A::outfile, Left;
|
|
print A::outfile, A::left;
|
|
print A::outfile, Right;
|
|
print A::outfile, A::right;
|
|
}, pred=anonymous-function
|
|
{
|
|
print A::outfile, ============PREDICATE============;
|
|
print A::outfile, A::typ;
|
|
print A::outfile, A::left;
|
|
print A::outfile, A::right;
|
|
return (T);
|
|
}, config={
|
|
|
|
}]
|
|
Type
|
|
Input::EVENT_CHANGED
|
|
Left
|
|
[i=1]
|
|
Right
|
|
[s=<uninitialized>, ss=TEST]
|
|
============EVENT============
|
|
Description
|
|
[source=../input.log, reader=Input::READER_ASCII, mode=Input::REREAD, name=ssh, destination={
|
|
[2] = [s=TEST, ss=TEST],
|
|
[1] = [s=TEST, ss=<uninitialized>]
|
|
}, idx=<no value description>, val=<no value description>, want_record=T, ev=line
|
|
{
|
|
print A::outfile, ============EVENT============;
|
|
print A::outfile, Description;
|
|
print A::outfile, A::description;
|
|
print A::outfile, Type;
|
|
print A::outfile, A::tpe;
|
|
print A::outfile, Left;
|
|
print A::outfile, A::left;
|
|
print A::outfile, Right;
|
|
print A::outfile, A::right;
|
|
}, pred=anonymous-function
|
|
{
|
|
print A::outfile, ============PREDICATE============;
|
|
print A::outfile, A::typ;
|
|
print A::outfile, A::left;
|
|
print A::outfile, A::right;
|
|
return (T);
|
|
}, config={
|
|
|
|
}]
|
|
Type
|
|
Input::EVENT_CHANGED
|
|
Left
|
|
[i=2]
|
|
Right
|
|
[s=<uninitialized>, ss=<uninitialized>]
|
|
==========SERVERS============
|
|
{
|
|
[2] = [s=TEST, ss=TEST],
|
|
[1] = [s=TEST, ss=<uninitialized>]
|
|
}
|
|
done
|