update for scripting coverage BTest demonstrating utility of @if ... &analyze

This commit is contained in:
Vern Paxson 2023-05-19 13:04:03 -07:00
parent be87f9f6ec
commit 8e375d34b7
4 changed files with 18 additions and 0 deletions

View file

@ -1,3 +1,5 @@
### BTest baseline data generated by btest-diff. Do not edit. Use "btest -U/-u" to update. Requires BTest >= 0.63.
1 ./profiling-test1.zeek, line 2 print new conn;
0 ./profiling-test1.zeek, line 6 print hidden new conn;
1 ./profiling-test1.zeek, lines 1-2 event new_connection BODY
0 ./profiling-test1.zeek, lines 5-6 event new_connection BODY

View file

@ -1,3 +1,5 @@
### BTest baseline data generated by btest-diff. Do not edit. Use "btest -U/-u" to update. Requires BTest >= 0.63.
2 ./profiling-test1.zeek, line 2 print new conn;
0 ./profiling-test1.zeek, line 6 print hidden new conn;
2 ./profiling-test1.zeek, lines 1-2 event new_connection BODY
0 ./profiling-test1.zeek, lines 5-6 event new_connection BODY

View file

@ -1,5 +1,9 @@
### BTest baseline data generated by btest-diff. Do not edit. Use "btest -U/-u" to update. Requires BTest >= 0.63.
2 ./profiling-test1.zeek, line 2 print new conn;
0 ./profiling-test1.zeek, line 6 print hidden new conn;
2 ./profiling-test1.zeek, lines 1-2 event new_connection BODY
0 ./profiling-test1.zeek, lines 5-6 event new_connection BODY
1 ./profiling-test2.zeek, line 2 print new conn;
0 ./profiling-test2.zeek, line 6 print hidden new conn;
1 ./profiling-test2.zeek, lines 1-2 event new_connection BODY
0 ./profiling-test2.zeek, lines 5-6 event new_connection BODY

View file

@ -15,9 +15,19 @@
@TEST-START-FILE profiling-test1.zeek
event new_connection(c: connection)
{ print "new conn"; }
@if ( F ) &analyze
event new_connection(c: connection)
{ print "hidden new conn"; }
@endif
@TEST-END-FILE
@TEST-START-FILE profiling-test2.zeek
event new_connection(c: connection)
{ print "new conn"; }
@if ( F ) &analyze
event new_connection(c: connection)
{ print "hidden new conn"; }
@endif
@TEST-END-FILE