mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 06:38:20 +00:00
btest/input/raw: Fix reread test
This seems to have relied on the reading file twice behavior simply testing that 16 lines are observed. Switch to using two separate files and doing a system("mv ...") to trigger the REREAD logic, there's not force_update() needed and it wouldn't do anything if the file hadn't changed anyway.
This commit is contained in:
parent
d8b5bdf758
commit
09b956562e
2 changed files with 40 additions and 298 deletions
|
@ -1,289 +1,13 @@
|
|||
### BTest baseline data generated by btest-diff. Do not edit. Use "btest -U/-u" to update. Requires BTest >= 0.63.
|
||||
[source=../input.log, reader=Input::READER_RAW, mode=Input::REREAD, name=input, fields=A::Val, want_record=F, ev=line
|
||||
{
|
||||
print outfile, A::description;
|
||||
print outfile, A::tpe;
|
||||
print outfile, A::s;
|
||||
try = try + 1;
|
||||
if (16 == try)
|
||||
{
|
||||
Input::remove(input);
|
||||
close(outfile);
|
||||
terminate();
|
||||
}
|
||||
|
||||
}, error_ev=<uninitialized>, config={
|
||||
|
||||
}]
|
||||
Input::EVENT_NEW
|
||||
sdfkh:KH;fdkncv;ISEUp34:Fkdj;YVpIODhfDF
|
||||
[source=../input.log, reader=Input::READER_RAW, mode=Input::REREAD, name=input, fields=A::Val, want_record=F, ev=line
|
||||
{
|
||||
print outfile, A::description;
|
||||
print outfile, A::tpe;
|
||||
print outfile, A::s;
|
||||
try = try + 1;
|
||||
if (16 == try)
|
||||
{
|
||||
Input::remove(input);
|
||||
close(outfile);
|
||||
terminate();
|
||||
}
|
||||
|
||||
}, error_ev=<uninitialized>, config={
|
||||
|
||||
}]
|
||||
Input::EVENT_NEW
|
||||
DSF"DFKJ"SDFKLh304yrsdkfj@#(*U$34jfDJup3UF
|
||||
[source=../input.log, reader=Input::READER_RAW, mode=Input::REREAD, name=input, fields=A::Val, want_record=F, ev=line
|
||||
{
|
||||
print outfile, A::description;
|
||||
print outfile, A::tpe;
|
||||
print outfile, A::s;
|
||||
try = try + 1;
|
||||
if (16 == try)
|
||||
{
|
||||
Input::remove(input);
|
||||
close(outfile);
|
||||
terminate();
|
||||
}
|
||||
|
||||
}, error_ev=<uninitialized>, config={
|
||||
|
||||
}]
|
||||
Input::EVENT_NEW
|
||||
q3r3057fdf
|
||||
[source=../input.log, reader=Input::READER_RAW, mode=Input::REREAD, name=input, fields=A::Val, want_record=F, ev=line
|
||||
{
|
||||
print outfile, A::description;
|
||||
print outfile, A::tpe;
|
||||
print outfile, A::s;
|
||||
try = try + 1;
|
||||
if (16 == try)
|
||||
{
|
||||
Input::remove(input);
|
||||
close(outfile);
|
||||
terminate();
|
||||
}
|
||||
|
||||
}, error_ev=<uninitialized>, config={
|
||||
|
||||
}]
|
||||
Input::EVENT_NEW
|
||||
sdfs\d
|
||||
[source=../input.log, reader=Input::READER_RAW, mode=Input::REREAD, name=input, fields=A::Val, want_record=F, ev=line
|
||||
{
|
||||
print outfile, A::description;
|
||||
print outfile, A::tpe;
|
||||
print outfile, A::s;
|
||||
try = try + 1;
|
||||
if (16 == try)
|
||||
{
|
||||
Input::remove(input);
|
||||
close(outfile);
|
||||
terminate();
|
||||
}
|
||||
|
||||
}, error_ev=<uninitialized>, config={
|
||||
|
||||
}]
|
||||
Input::EVENT_NEW
|
||||
|
||||
[source=../input.log, reader=Input::READER_RAW, mode=Input::REREAD, name=input, fields=A::Val, want_record=F, ev=line
|
||||
{
|
||||
print outfile, A::description;
|
||||
print outfile, A::tpe;
|
||||
print outfile, A::s;
|
||||
try = try + 1;
|
||||
if (16 == try)
|
||||
{
|
||||
Input::remove(input);
|
||||
close(outfile);
|
||||
terminate();
|
||||
}
|
||||
|
||||
}, error_ev=<uninitialized>, config={
|
||||
|
||||
}]
|
||||
Input::EVENT_NEW
|
||||
dfsdf
|
||||
[source=../input.log, reader=Input::READER_RAW, mode=Input::REREAD, name=input, fields=A::Val, want_record=F, ev=line
|
||||
{
|
||||
print outfile, A::description;
|
||||
print outfile, A::tpe;
|
||||
print outfile, A::s;
|
||||
try = try + 1;
|
||||
if (16 == try)
|
||||
{
|
||||
Input::remove(input);
|
||||
close(outfile);
|
||||
terminate();
|
||||
}
|
||||
|
||||
}, error_ev=<uninitialized>, config={
|
||||
|
||||
}]
|
||||
Input::EVENT_NEW
|
||||
sdf
|
||||
[source=../input.log, reader=Input::READER_RAW, mode=Input::REREAD, name=input, fields=A::Val, want_record=F, ev=line
|
||||
{
|
||||
print outfile, A::description;
|
||||
print outfile, A::tpe;
|
||||
print outfile, A::s;
|
||||
try = try + 1;
|
||||
if (16 == try)
|
||||
{
|
||||
Input::remove(input);
|
||||
close(outfile);
|
||||
terminate();
|
||||
}
|
||||
|
||||
}, error_ev=<uninitialized>, config={
|
||||
|
||||
}]
|
||||
Input::EVENT_NEW
|
||||
3rw43wRRERLlL#RWERERERE.
|
||||
[source=../input.log, reader=Input::READER_RAW, mode=Input::REREAD, name=input, fields=A::Val, want_record=F, ev=line
|
||||
{
|
||||
print outfile, A::description;
|
||||
print outfile, A::tpe;
|
||||
print outfile, A::s;
|
||||
try = try + 1;
|
||||
if (16 == try)
|
||||
{
|
||||
Input::remove(input);
|
||||
close(outfile);
|
||||
terminate();
|
||||
}
|
||||
|
||||
}, error_ev=<uninitialized>, config={
|
||||
|
||||
}]
|
||||
Input::EVENT_NEW
|
||||
sdfkh:KH;fdkncv;ISEUp34:Fkdj;YVpIODhfDF
|
||||
[source=../input.log, reader=Input::READER_RAW, mode=Input::REREAD, name=input, fields=A::Val, want_record=F, ev=line
|
||||
{
|
||||
print outfile, A::description;
|
||||
print outfile, A::tpe;
|
||||
print outfile, A::s;
|
||||
try = try + 1;
|
||||
if (16 == try)
|
||||
{
|
||||
Input::remove(input);
|
||||
close(outfile);
|
||||
terminate();
|
||||
}
|
||||
|
||||
}, error_ev=<uninitialized>, config={
|
||||
|
||||
}]
|
||||
Input::EVENT_NEW
|
||||
DSF"DFKJ"SDFKLh304yrsdkfj@#(*U$34jfDJup3UF
|
||||
[source=../input.log, reader=Input::READER_RAW, mode=Input::REREAD, name=input, fields=A::Val, want_record=F, ev=line
|
||||
{
|
||||
print outfile, A::description;
|
||||
print outfile, A::tpe;
|
||||
print outfile, A::s;
|
||||
try = try + 1;
|
||||
if (16 == try)
|
||||
{
|
||||
Input::remove(input);
|
||||
close(outfile);
|
||||
terminate();
|
||||
}
|
||||
|
||||
}, error_ev=<uninitialized>, config={
|
||||
|
||||
}]
|
||||
Input::EVENT_NEW
|
||||
q3r3057fdf
|
||||
[source=../input.log, reader=Input::READER_RAW, mode=Input::REREAD, name=input, fields=A::Val, want_record=F, ev=line
|
||||
{
|
||||
print outfile, A::description;
|
||||
print outfile, A::tpe;
|
||||
print outfile, A::s;
|
||||
try = try + 1;
|
||||
if (16 == try)
|
||||
{
|
||||
Input::remove(input);
|
||||
close(outfile);
|
||||
terminate();
|
||||
}
|
||||
|
||||
}, error_ev=<uninitialized>, config={
|
||||
|
||||
}]
|
||||
Input::EVENT_NEW
|
||||
sdfs\d
|
||||
[source=../input.log, reader=Input::READER_RAW, mode=Input::REREAD, name=input, fields=A::Val, want_record=F, ev=line
|
||||
{
|
||||
print outfile, A::description;
|
||||
print outfile, A::tpe;
|
||||
print outfile, A::s;
|
||||
try = try + 1;
|
||||
if (16 == try)
|
||||
{
|
||||
Input::remove(input);
|
||||
close(outfile);
|
||||
terminate();
|
||||
}
|
||||
|
||||
}, error_ev=<uninitialized>, config={
|
||||
|
||||
}]
|
||||
Input::EVENT_NEW
|
||||
|
||||
[source=../input.log, reader=Input::READER_RAW, mode=Input::REREAD, name=input, fields=A::Val, want_record=F, ev=line
|
||||
{
|
||||
print outfile, A::description;
|
||||
print outfile, A::tpe;
|
||||
print outfile, A::s;
|
||||
try = try + 1;
|
||||
if (16 == try)
|
||||
{
|
||||
Input::remove(input);
|
||||
close(outfile);
|
||||
terminate();
|
||||
}
|
||||
|
||||
}, error_ev=<uninitialized>, config={
|
||||
|
||||
}]
|
||||
Input::EVENT_NEW
|
||||
dfsdf
|
||||
[source=../input.log, reader=Input::READER_RAW, mode=Input::REREAD, name=input, fields=A::Val, want_record=F, ev=line
|
||||
{
|
||||
print outfile, A::description;
|
||||
print outfile, A::tpe;
|
||||
print outfile, A::s;
|
||||
try = try + 1;
|
||||
if (16 == try)
|
||||
{
|
||||
Input::remove(input);
|
||||
close(outfile);
|
||||
terminate();
|
||||
}
|
||||
|
||||
}, error_ev=<uninitialized>, config={
|
||||
|
||||
}]
|
||||
Input::EVENT_NEW
|
||||
sdf
|
||||
[source=../input.log, reader=Input::READER_RAW, mode=Input::REREAD, name=input, fields=A::Val, want_record=F, ev=line
|
||||
{
|
||||
print outfile, A::description;
|
||||
print outfile, A::tpe;
|
||||
print outfile, A::s;
|
||||
try = try + 1;
|
||||
if (16 == try)
|
||||
{
|
||||
Input::remove(input);
|
||||
close(outfile);
|
||||
terminate();
|
||||
}
|
||||
|
||||
}, error_ev=<uninitialized>, config={
|
||||
|
||||
}]
|
||||
Input::EVENT_NEW
|
||||
3rw43wRRERLlL#RWERERERE.
|
||||
1, Input::EVENT_NEW, sdfkh:KH;fdkncv;ISEUp34:Fkdj;YVpIODhfDF, 39
|
||||
2, Input::EVENT_NEW, DSF"DFKJ"SDFKLh304yrsdkfj@#(*U$34jfDJup3UF, 42
|
||||
3, Input::EVENT_NEW, q3r3057fdf, 10
|
||||
4, Input::EVENT_NEW, sdfs\d, 6
|
||||
5, Input::EVENT_NEW, , 0
|
||||
6, Input::EVENT_NEW, dfsdf, 5
|
||||
7, Input::EVENT_NEW, sdf, 3
|
||||
8, Input::EVENT_NEW, 3rw43wRRERLlL#RWERERERE., 24
|
||||
end_of_data, updating input.log
|
||||
9, Input::EVENT_NEW, Beginning of input2.log, 23
|
||||
10, Input::EVENT_NEW, 3rw43wRRERLlL#RWERERERE., 24
|
||||
11, Input::EVENT_NEW, game over, 9
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue