Improve btests with unstable table/set output ordering

Particularly, the final output order of a table/set is sensitive to
order of input/insertions and some tests were converting
std::unordered_{set,map} to Zeek table/set and iteration over those
standard containers may not always loop through elements in the same
order across all platforms.
This commit is contained in:
Jon Siwek 2020-08-07 15:31:19 -07:00 committed by Tim Wojtulewicz
parent 89b08a3983
commit af2262ddff
24 changed files with 200 additions and 300 deletions

View file

@ -13,7 +13,14 @@ event zeek_init()
event zeek_init() &priority = -10
{
print Reporter::get_weird_sampling_whitelist();
local v: vector of string = vector();
local wl = Reporter::get_weird_sampling_whitelist();
for ( e in wl )
v += e;
sort(v, strcmp);
print v;
print Reporter::get_weird_sampling_rate();
print Reporter::get_weird_sampling_threshold();
print Reporter::get_weird_sampling_duration();