mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 14:48:21 +00:00
Add btest for get_current_packet_ts()
This commit is contained in:
parent
08c5a9c66d
commit
6977c07a25
2 changed files with 22 additions and 0 deletions
|
@ -0,0 +1,5 @@
|
||||||
|
### BTest baseline data generated by btest-diff. Do not edit. Use "btest -U/-u" to update. Requires BTest >= 0.63.
|
||||||
|
network_time_init network time: 1362692526.869344
|
||||||
|
network_time_init packet ts: 1362692526.869344
|
||||||
|
conn_state_remove network time: 1362692527.080972
|
||||||
|
conn_state_remove packet ts: 0.0
|
17
testing/btest/core/network_time/packet_ts.zeek
Normal file
17
testing/btest/core/network_time/packet_ts.zeek
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
# @TEST-DOC: Test get_current_packet_ts() in comparison with network_time().
|
||||||
|
# @TEST-EXEC: zeek -b -r $TRACES/http/get.trace %INPUT > output
|
||||||
|
# @TEST-EXEC: TEST_DIFF_CANONIFIER= btest-diff output
|
||||||
|
|
||||||
|
event network_time_init()
|
||||||
|
{
|
||||||
|
print fmt("network_time_init network time: %s", network_time());
|
||||||
|
print fmt("network_time_init packet ts: %s", get_current_packet_ts());
|
||||||
|
}
|
||||||
|
|
||||||
|
# Note: Gracefully closed connections will be actually removed after
|
||||||
|
# tcp_close_delay (default 5 secs).
|
||||||
|
event connection_state_remove(c: connection)
|
||||||
|
{
|
||||||
|
print fmt("conn_state_remove network time: %s", network_time());
|
||||||
|
print fmt("conn_state_remove packet ts: %s", get_current_packet_ts());
|
||||||
|
}
|
Loading…
Add table
Add a link
Reference in a new issue