From d1db76862459f7fb34fd71275ba639338c52a5e7 Mon Sep 17 00:00:00 2001 From: Robin Sommer Date: Tue, 10 May 2011 17:11:01 -0700 Subject: [PATCH 01/16] Fix for major bug in POP3 analyzer, which didn't recognize '.' terminators in multi-line replies if the terminator was bare (no newline). This caused it to ignore the rest of the session that it's analyzing. Patch from #444 by Vern. --- src/POP3.cc | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/POP3.cc b/src/POP3.cc index 4f1f2a5ea7..5d38b4c3d1 100644 --- a/src/POP3.cc +++ b/src/POP3.cc @@ -576,9 +576,11 @@ void POP3_Analyzer::ProcessReply(int length, const char* line) if ( multiLine == true ) { bool terminator = - length > 1 && line[0] == '.' && - (line[1] == '\n' || - (length > 2 && line[1] == '\r' && line[2] == '\n')); + line[0] == '.' && + (length == 1 || + (length > 1 && + (line[1] == '\n' || + (length > 2 && line[1] == '\r' && line[2] == '\n')))); if ( terminator ) { From 03cd7a47ac4e3a86f27c9500220c2b0186e14a85 Mon Sep 17 00:00:00 2001 From: Robin Sommer Date: Tue, 10 May 2011 17:28:09 -0700 Subject: [PATCH 02/16] Moving the test-scripts from the old test-suite over to btest. --- .../language.cross-product-init/output | 6 + .../btest/Baseline/language.enum-scope/output | 1 + .../btest/Baseline/language.match-test/output | 3 + .../Baseline/language.match-test2/output | 1 + .../btest/Baseline/language.next-test/output | 8 ++ .../Baseline/language.rare-events/output | 1 + .../btest/Baseline/language.rec-of-tbl/output | 3 + testing/btest/Baseline/language.sizeof/output | 17 +++ .../language.smith-waterman-test/output | 32 +++++ .../btest/Baseline/language.strings/output | 25 ++++ .../language.wrong-delete-field/output | 2 +- testing/btest/language/cross-product-init.bro | 10 ++ testing/btest/language/delete-field-set.bro | 1 - testing/btest/language/delete-field.bro | 1 - testing/btest/language/enum-scope.bro | 10 ++ testing/btest/language/match-test.bro | 20 +++ testing/btest/language/match-test2.bro | 51 ++++++++ testing/btest/language/next-test.bro | 36 ++++++ testing/btest/language/rare-events.bro | 37 ++++++ testing/btest/language/rec-nested-opt.bro | 1 - testing/btest/language/rec-of-tbl.bro | 16 +++ testing/btest/language/rec-table-default.bro | 1 - testing/btest/language/sizeof.bro | 119 ++++++++++++++++++ .../btest/language/smith-waterman-test.bro | 88 +++++++++++++ testing/btest/language/strings.bro | 48 +++++++ testing/btest/language/wrong-delete-field.bro | 1 - 26 files changed, 533 insertions(+), 6 deletions(-) create mode 100644 testing/btest/Baseline/language.cross-product-init/output create mode 100644 testing/btest/Baseline/language.enum-scope/output create mode 100644 testing/btest/Baseline/language.match-test/output create mode 100644 testing/btest/Baseline/language.match-test2/output create mode 100644 testing/btest/Baseline/language.next-test/output create mode 100644 testing/btest/Baseline/language.rare-events/output create mode 100644 testing/btest/Baseline/language.rec-of-tbl/output create mode 100644 testing/btest/Baseline/language.sizeof/output create mode 100644 testing/btest/Baseline/language.smith-waterman-test/output create mode 100644 testing/btest/Baseline/language.strings/output create mode 100644 testing/btest/language/cross-product-init.bro create mode 100644 testing/btest/language/enum-scope.bro create mode 100644 testing/btest/language/match-test.bro create mode 100644 testing/btest/language/match-test2.bro create mode 100644 testing/btest/language/next-test.bro create mode 100644 testing/btest/language/rare-events.bro create mode 100644 testing/btest/language/rec-of-tbl.bro create mode 100644 testing/btest/language/sizeof.bro create mode 100644 testing/btest/language/smith-waterman-test.bro create mode 100644 testing/btest/language/strings.bro diff --git a/testing/btest/Baseline/language.cross-product-init/output b/testing/btest/Baseline/language.cross-product-init/output new file mode 100644 index 0000000000..95794f9179 --- /dev/null +++ b/testing/btest/Baseline/language.cross-product-init/output @@ -0,0 +1,6 @@ +{ +[bar, 1.2.0.0/19] , +[foo, 5.6.0.0/21] , +[bar, 5.6.0.0/21] , +[foo, 1.2.0.0/19] +} diff --git a/testing/btest/Baseline/language.enum-scope/output b/testing/btest/Baseline/language.enum-scope/output new file mode 100644 index 0000000000..f2ad6c76f0 --- /dev/null +++ b/testing/btest/Baseline/language.enum-scope/output @@ -0,0 +1 @@ +c diff --git a/testing/btest/Baseline/language.match-test/output b/testing/btest/Baseline/language.match-test/output new file mode 100644 index 0000000000..5ee7ba029d --- /dev/null +++ b/testing/btest/Baseline/language.match-test/output @@ -0,0 +1,3 @@ +default +it's big +it's really big diff --git a/testing/btest/Baseline/language.match-test2/output b/testing/btest/Baseline/language.match-test2/output new file mode 100644 index 0000000000..0cfbf08886 --- /dev/null +++ b/testing/btest/Baseline/language.match-test2/output @@ -0,0 +1 @@ +2 diff --git a/testing/btest/Baseline/language.next-test/output b/testing/btest/Baseline/language.next-test/output new file mode 100644 index 0000000000..db9ce4efa4 --- /dev/null +++ b/testing/btest/Baseline/language.next-test/output @@ -0,0 +1,8 @@ +0 +1 +1 +MIDDLE +0 +0 +1 +THE END diff --git a/testing/btest/Baseline/language.rare-events/output b/testing/btest/Baseline/language.rare-events/output new file mode 100644 index 0000000000..1de3641284 --- /dev/null +++ b/testing/btest/Baseline/language.rare-events/output @@ -0,0 +1 @@ +1106953531.452525 DroppedPackets 2 packets dropped after filtering, 1109 received, 10000 on link diff --git a/testing/btest/Baseline/language.rec-of-tbl/output b/testing/btest/Baseline/language.rec-of-tbl/output new file mode 100644 index 0000000000..f7c06f0b63 --- /dev/null +++ b/testing/btest/Baseline/language.rec-of-tbl/output @@ -0,0 +1,3 @@ +[a={ +[5] = 3 +}] diff --git a/testing/btest/Baseline/language.sizeof/output b/testing/btest/Baseline/language.sizeof/output new file mode 100644 index 0000000000..0c1f3448c6 --- /dev/null +++ b/testing/btest/Baseline/language.sizeof/output @@ -0,0 +1,17 @@ +Address 1.2.3.4: 16909060 +Boolean T: 1 +Count 10: 10 +Double -1.23: 1.230000 +Enum ENUM3: 2 +File 21.000000 +Function add_interface: 2 +Integer -10: 10 +Interval -5.0 secs: 5.000000 +Net 192.168.0: 65536.000000 +Port 80/tcp: 65616 +Record [i=10, j=, k=]: 3 +Set: 3 +String 'Hello': 5 +Subnet 192.168.0.0/24: 256.000000 +Table 2 +Vector [Hello, , , , World]: 5 diff --git a/testing/btest/Baseline/language.smith-waterman-test/output b/testing/btest/Baseline/language.smith-waterman-test/output new file mode 100644 index 0000000000..b0d0d33526 --- /dev/null +++ b/testing/btest/Baseline/language.smith-waterman-test/output @@ -0,0 +1,32 @@ +abcdefgh - ijklmnop: +AAAabcefghij - lmnopAAAqrst: +tok 1: AAA (0/5, T) +abcAAAefghij - lmnopAAAqrst: +tok 1: AAA (3/5, T) +abcefghijAAA - lmnopAAAqrst: +tok 1: AAA (9/5, T) +xxxAAAyyy - AAAaAAAbAAA: +tok 1: AAA (3/0, T) +tok 2: AAA (3/4, T) +tok 3: AAA (3/8, T) +AAAaAAAbAAA - xxxAAAyyy: +tok 1: AAA (0/3, T) +tok 2: AAA (4/3, T) +tok 3: AAA (8/3, T) +xxCDyABzCDyABzz - ABCD: +tok 1: CD (2/2, T) +tok 2: AB (5/0, T) +tok 3: CD (8/2, F) +tok 4: AB (11/0, T) +ABCD - xxCDyABzCDyABzz: +tok 1: CD (2/2, T) +tok 2: AB (0/5, T) +tok 3: CD (2/8, F) +tok 4: AB (0/11, T) +Cache-control: no-cache^M^JAccept: - Accept-: deflate^M^JAccept-: Accept-: +tok 1: Accept (27/0, T) +tok 2: e^M^JAccept (22/15, T) +tok 3: Accept (27/29, T) +xxAAxxAAxx - yyyyyAAyyyyy: +tok 1: AA (2/5, T) +tok 2: AA (6/5, T) diff --git a/testing/btest/Baseline/language.strings/output b/testing/btest/Baseline/language.strings/output new file mode 100644 index 0000000000..525ce64916 --- /dev/null +++ b/testing/btest/Baseline/language.strings/output @@ -0,0 +1,25 @@ +Input string: broisaveryneatids + +String splitting +---------------- +Splitting 'broisaveryneatids' at 6 points... +bro +is +a +very +neat +ids + +Substrings +---------- +3@0: bro +5@2: roisa +7@4: isavery +10@10: yneatids + +Finding strings +--------------- +isa: 4 +very: 7 +ids: 15 +nono: 0 diff --git a/testing/btest/Baseline/language.wrong-delete-field/output b/testing/btest/Baseline/language.wrong-delete-field/output index c51fb6a37e..8d965362f1 100644 --- a/testing/btest/Baseline/language.wrong-delete-field/output +++ b/testing/btest/Baseline/language.wrong-delete-field/output @@ -1 +1 @@ -/da/home/robin/bro/master/testing/btest/.tmp/language.wrong-delete-field/wrong-delete-field.bro, line 11 (delete x$a): error, illegal delete statement +/da/home/robin/bro/master/testing/btest/.tmp/language.wrong-delete-field/wrong-delete-field.bro, line 10 (delete x$a): error, illegal delete statement diff --git a/testing/btest/language/cross-product-init.bro b/testing/btest/language/cross-product-init.bro new file mode 100644 index 0000000000..c12f9eb0bd --- /dev/null +++ b/testing/btest/language/cross-product-init.bro @@ -0,0 +1,10 @@ +# @TEST-EXEC: bro %INPUT >output 2>&1 +# @TEST-EXEC: btest-diff output + +global my_subs = { 1.2.3.4/19, 5.6.7.8/21 }; + +global x: set[string, subnet] &redef; + +redef x += { [["foo", "bar"], my_subs] }; + +print x; diff --git a/testing/btest/language/delete-field-set.bro b/testing/btest/language/delete-field-set.bro index 9469dbb2f0..ad7cf6e9fb 100644 --- a/testing/btest/language/delete-field-set.bro +++ b/testing/btest/language/delete-field-set.bro @@ -1,4 +1,3 @@ - # @TEST-EXEC: bro %INPUT >output 2>&1 # @TEST-EXEC: btest-diff output diff --git a/testing/btest/language/delete-field.bro b/testing/btest/language/delete-field.bro index 0aad10d55f..477466b76a 100644 --- a/testing/btest/language/delete-field.bro +++ b/testing/btest/language/delete-field.bro @@ -1,4 +1,3 @@ - # @TEST-EXEC: bro %INPUT >output 2>&1 # @TEST-EXEC: btest-diff output diff --git a/testing/btest/language/enum-scope.bro b/testing/btest/language/enum-scope.bro new file mode 100644 index 0000000000..c8667bfada --- /dev/null +++ b/testing/btest/language/enum-scope.bro @@ -0,0 +1,10 @@ +# @TEST-EXEC: bro %INPUT >output 2>&1 +# @TEST-EXEC: btest-diff output + +type foo: enum { a, b } &redef; + +module test; + +redef enum foo += { c }; + +print c; diff --git a/testing/btest/language/match-test.bro b/testing/btest/language/match-test.bro new file mode 100644 index 0000000000..9352d0f39f --- /dev/null +++ b/testing/btest/language/match-test.bro @@ -0,0 +1,20 @@ +# @TEST-EXEC: bro %INPUT >output 2>&1 +# @TEST-EXEC: btest-diff output + +global match_stuff = { + [$pred(a: count) = { return a > 5; }, + $result = "it's big", + $priority = 2], + + [$pred(a: count) = { return a > 15; }, + $result = "it's really big", + $priority = 3], + + [$pred(a: count) = { return T; }, + $result = "default", + $priority = 0], +}; + +print match 0 using match_stuff; +print match 10 using match_stuff; +print match 20 using match_stuff; diff --git a/testing/btest/language/match-test2.bro b/testing/btest/language/match-test2.bro new file mode 100644 index 0000000000..f1c120adf2 --- /dev/null +++ b/testing/btest/language/match-test2.bro @@ -0,0 +1,51 @@ +# @TEST-EXEC: bro %INPUT >output 2>&1 +# @TEST-EXEC: btest-diff output + +type fakealert : record { + alert: string; +}; + + +type match_rec : record { + result : count; + pred : function(rec : fakealert) : bool; + priority: count; +}; + + +#global test_set : set[int] = +#{ +#1, 2, 3 +#}; + +global match_set : set[match_rec] = +{ + [$result = 1, $pred(a: fakealert) = { return T; }, $priority = 8 ], + [$result = 2, $pred(a: fakealert) = { return T; }, $priority = 9 ] +}; + +global al : fakealert; + +#global testset : set[fakealert] = +#{ +# [$alert="hithere"] +#}; + + +type nonalert: record { + alert : string; + pred : function(a : int) : int; +}; + +#global na : nonalert; +#na$alert = "5"; + +#al$alert = "hithere2"; +#if (al in testset) +# print 1; +#else +# print 0; + + +al$alert = "hi"; +print (match al using match_set); diff --git a/testing/btest/language/next-test.bro b/testing/btest/language/next-test.bro new file mode 100644 index 0000000000..7e9626a62c --- /dev/null +++ b/testing/btest/language/next-test.bro @@ -0,0 +1,36 @@ +# @TEST-EXEC: bro %INPUT >output 2>&1 +# @TEST-EXEC: btest-diff output + +# This script tests "next" being called during the last iteration of a +# for loop + +event bro_done() + { + + local number_set: set[count]; + local i: count; + + add number_set[0]; + add number_set[1]; + + + for ( i in number_set ) + { + print fmt ("%d", i); + if ( i == 0 ) + next; + print fmt ("%d", i); + } + print fmt ("MIDDLE"); + + + for ( i in number_set ) + { + print fmt ("%d", i); + if ( i == 1 ) + next; + print fmt ("%d", i); + } + print fmt ("THE END"); + + } diff --git a/testing/btest/language/rare-events.bro b/testing/btest/language/rare-events.bro new file mode 100644 index 0000000000..ae7674d406 --- /dev/null +++ b/testing/btest/language/rare-events.bro @@ -0,0 +1,37 @@ +# @TEST-EXEC: bro %INPUT >output 2>&1 +# @TEST-EXEC: btest-diff output + +# This is a test script whose job is to generate rarely-seen events +# (i.e., events that test traces might not include) to ensure that they're +# handled properly. + +# This is needed or else the output fails on the warning that +# Drop::restore_dropped_address is never defined. +redef check_for_unused_event_handlers = F; + +@load netstats + +function test_net_stats_update() + { + local t = current_time(); + + local s: net_stats; + s$pkts_recvd = 1234; + s$pkts_dropped = 123; + s$pkts_link = 9999; + + event net_stats_update(t, s); + + local s2: net_stats; + s2$pkts_recvd = 2341; + s2$pkts_dropped = 125; + s2$pkts_link = 19999; + + event net_stats_update(t + 33 sec, s2); + } + +event bro_init() + { + test_net_stats_update(); + } + diff --git a/testing/btest/language/rec-nested-opt.bro b/testing/btest/language/rec-nested-opt.bro index eb7375541b..ab1a64dffd 100644 --- a/testing/btest/language/rec-nested-opt.bro +++ b/testing/btest/language/rec-nested-opt.bro @@ -1,4 +1,3 @@ - # @TEST-EXEC: bro %INPUT >output 2>&1 # @TEST-EXEC: btest-diff output diff --git a/testing/btest/language/rec-of-tbl.bro b/testing/btest/language/rec-of-tbl.bro new file mode 100644 index 0000000000..59d770bb30 --- /dev/null +++ b/testing/btest/language/rec-of-tbl.bro @@ -0,0 +1,16 @@ +# @TEST-EXEC: bro %INPUT >output 2>&1 +# @TEST-EXEC: btest-diff output + +type x: record { + a: table[int] of count; +}; + +global y: x; + +global yy: table[int] of count; + +y$a = yy; + +y$a[+5] = 3; + +print y; diff --git a/testing/btest/language/rec-table-default.bro b/testing/btest/language/rec-table-default.bro index 1473933e6a..ee4a0e25ee 100644 --- a/testing/btest/language/rec-table-default.bro +++ b/testing/btest/language/rec-table-default.bro @@ -1,4 +1,3 @@ - # @TEST-EXEC: bro %INPUT >output 2>&1 # @TEST-EXEC: btest-diff output diff --git a/testing/btest/language/sizeof.bro b/testing/btest/language/sizeof.bro new file mode 100644 index 0000000000..7db78212ad --- /dev/null +++ b/testing/btest/language/sizeof.bro @@ -0,0 +1,119 @@ +# @TEST-EXEC: bro %INPUT >output 2>&1 +# @TEST-EXEC: btest-diff output + +# Demo policy for the sizeof operator "|x|". +# ------------------------------------------ +# +# This script creates various types and values and shows the result of the +# sizeof operator on these values. +# +# For any types not covered in this script, the sizeof operator's semantics +# are not defined and its application returns a count of 0. At the moment +# the only type where this should happen is string patterns. + +type example_enum: enum { ENUM1, ENUM2, ENUM3 }; + +type example_record: record { + i: int &optional; + j: int &optional; + k: int &optional; +}; + +global a: addr = 1.2.3.4; +global b: bool = T; +global c: count = 10; +global d: double = -1.23; +global f: file = open_log_file("sizeof_demo"); +global i: int = -10; +global iv: interval = -5sec; +global n: net = 192.168.; +global p: port = 80/tcp; +global r: example_record [ $i = 10 ]; +global si: set[int]; +global s: string = "Hello"; +global sn: subnet = 192.168.0.0/24; +global t: table[string] of string; +global ti: time = current_time(); +global v: vector of string; + +# Additional initialization +# +print f, "12345678901234567890"; + +add si[1]; +add si[10]; +add si[100]; + +t["foo"] = "Hello"; +t["bar"] = "World"; + +v[0] = "Hello"; +v[4] = "World"; + +# Print out the sizes of the various vals: +#----------------------------------------- + +# Size of addr: returns integer representation for IPv4, 0 for IPv6. +print fmt("Address %s: %d", a, |a|); + +# Size of boolean: returns 1 or 0. +print fmt("Boolean %s: %d", b, |b|); + +# Size of count: identity. +print fmt("Count %s: %d", c, |c|); + +# Size of double: returns absolute value. +print fmt("Double %s: %f", d, |d|); + +# Size of enum: returns numeric value of enum constant. +print fmt("Enum %s: %d", ENUM3, |ENUM3|); + +# Size of file: returns current file size. +# Note that this is a double so that file sizes >> 4GB +# can be expressed. +print fmt("File %f", |f|); + +# Size of function: returns number of arguments. +print fmt("Function add_interface: %d", |add_interface|); + +# Size of integer: returns absolute value. +print fmt("Integer %s: %d", i, |i|); + +# Size of interval: returns double representation of the interval +print fmt("Interval %s: %f", iv, |iv|); + +# Size of net: returns size of class N network as a double +# (so that 2^32 can be expressed too). +print fmt("Net %s: %f", n, |n|); + +# Size of port: returns port number as a count. +print fmt("Port %s: %d", p, |p|); + +# Size of record: returns number of fields (assigned + unassigned) +print fmt("Record %s: %d", r, |r|); + +# Size of set: returns number of elements in set. +# Don't print the set, as its order depends on the seeding of the hash +# fnction, and it's not worth the trouble to normalize it. +print fmt("Set: %d", |si|); + +# Size of string: returns string length. +print fmt("String '%s': %d", s, |s|); + +# Size of subnet: returns size of net as a double +# (so that 2^32 can be expressed too). +print fmt("Subnet %s: %f", sn, |sn|); + +# Size of table: returns number of elements in table +print fmt("Table %d", |t|); + +# Size of time: returns double representation of the time +# print fmt("Time %s: %f", ti, |ti|); + +# Size of vector: returns largest assigned index. +# Note that this is not the number of assigned values. +# The following prints "5": +# +print fmt("Vector %s: %d", v, |v|); + +close(f); diff --git a/testing/btest/language/smith-waterman-test.bro b/testing/btest/language/smith-waterman-test.bro new file mode 100644 index 0000000000..50f5c1dae1 --- /dev/null +++ b/testing/btest/language/smith-waterman-test.bro @@ -0,0 +1,88 @@ +# @TEST-EXEC: bro %INPUT >output 2>&1 +# @TEST-EXEC: btest-diff output + +global params: sw_params = [ $min_strlen = 2, $sw_variant = 0 ]; + +global min: vector of count; +global mode: vector of count; +global c: count = 0; + +# Alignment pairs: +global s1: string_vec; +global s2: string_vec; + +# Single alignment, no matches: +s1[++c] = "abcdefgh"; +s2[c] = "ijklmnop"; +min[c] = 2;; +mode[c] = 0; + +# Simple single match, beginning: +s1[++c] = "AAAabcefghij"; +s2[c] = "lmnopAAAqrst"; +min[c] = 2;; +mode[c] = 0; + +# Simple single match, middle: +s1[++c] = "abcAAAefghij"; +s2[c] = "lmnopAAAqrst"; +min[c] = 2;; +mode[c] = 0; + +# Simple single match, end: +s1[++c] = "abcefghijAAA"; +s2[c] = "lmnopAAAqrst"; +min[c] = 2;; +mode[c] = 0; + +# Repeated alignment: +s1[++c] = "xxxAAAyyy"; +s2[c] = "AAAaAAAbAAA"; +min[c] = 2;; +mode[c] = 1; + +# Repeated alignment, swapped input: +s1[++c] = "AAAaAAAbAAA"; +s2[c] = "xxxAAAyyy"; +min[c] = 2;; +mode[c] = 1; + +# Repeated alignment, split: +s1[++c] = "xxCDyABzCDyABzz"; +s2[c] = "ABCD"; +min[c] = 2;; +mode[c] = 1; + +# Repeated alignment, split, swapped: +s1[++c] = "ABCD"; +s2[c] = "xxCDyABzCDyABzz"; +min[c] = 2;; +mode[c] = 1; + +# Used to cause problems +s1[++c] = "Cache-control: no-cache^M^JAccept:"; +s2[c] = "Accept-: deflate^M^JAccept-: Accept-"; +min[c] = 6; +mode[c] = 1; + +# Repeated occurrences in shorter string +s1[++c] = "xxAAxxAAxx"; +s2[c] = "yyyyyAAyyyyy"; +min[c] = 2; +mode[c] = 1; + +for ( i in s1 ) + { + local ss: sw_substring_vec; + + params$min_strlen = min[i]; + params$sw_variant = mode[i]; + ss = str_smith_waterman(s1[i], s2[i], params); + + print fmt("%s - %s:", s1[i], s2[i]); + + for ( j in ss ) + print fmt("tok %d: %s (%d/%d, %s)", + j, ss[j]$str, ss[j]$aligns[1]$index, + ss[j]$aligns[2]$index, ss[j]$new); + } diff --git a/testing/btest/language/strings.bro b/testing/btest/language/strings.bro new file mode 100644 index 0000000000..8e9eef43bf --- /dev/null +++ b/testing/btest/language/strings.bro @@ -0,0 +1,48 @@ +# @TEST-EXEC: bro %INPUT >output 2>&1 +# @TEST-EXEC: btest-diff output + +# Demo policy for string functions +# + +event bro_init() +{ + local s1: string = "broisaveryneatids"; + + print fmt("Input string: %s", s1); + print fmt(); + print fmt("String splitting"); + print fmt("----------------"); + + local idx1: index_vec; + + idx1[0] = 0; # We really need initializers for vectors ... + idx1[1] = 3; + idx1[2] = 5; + idx1[3] = 6; + idx1[4] = 10; + idx1[5] = 14; + + print fmt("Splitting '%s' at %d points...", s1, |idx1|); + local res_split: string_vec = str_split(s1, idx1); + + for ( i in res_split ) + print res_split[i]; + + print fmt(); + print fmt("Substrings"); + print fmt("----------"); + print fmt("3@0: %s", sub_bytes(s1, 0, 3)); + print fmt("5@2: %s", sub_bytes(s1, 2, 5)); + print fmt("7@4: %s", sub_bytes(s1, 4, 7)); + print fmt("10@10: %s", sub_bytes(s1, 10, 10)); + print fmt(); + + + print fmt("Finding strings"); + print fmt("---------------"); + print fmt("isa: %d", strstr(s1, "isa")); + print fmt("very: %d", strstr(s1, "very")); + print fmt("ids: %d", strstr(s1, "ids")); + print fmt("nono: %d", strstr(s1, "nono")); +} + diff --git a/testing/btest/language/wrong-delete-field.bro b/testing/btest/language/wrong-delete-field.bro index deffe379f4..0b58cc6fa0 100644 --- a/testing/btest/language/wrong-delete-field.bro +++ b/testing/btest/language/wrong-delete-field.bro @@ -1,4 +1,3 @@ - # @TEST-EXEC-FAIL: bro %INPUT >output 2>&1 # @TEST-EXEC: btest-diff output From 61c929bc16cb9a2bafd827e398b74b1c5bea25ee Mon Sep 17 00:00:00 2001 From: Robin Sommer Date: Tue, 10 May 2011 17:51:54 -0700 Subject: [PATCH 03/16] Updating btests and a Makefile. "make" now runs all the tests. --- testing/btest/Baseline/core.conn-id/counts | 2 +- testing/btest/Baseline/core.conn-id/output | 112 ++++++++++----- testing/btest/Baseline/core.conn-id/output.cc | 116 ++++++++++----- .../btest/Baseline/core.conn-id/output.cc2 | 112 ++++++++++----- .../btest/Baseline/logging.rotate-custom/out | 135 ++++++------------ testing/btest/Makefile | 14 ++ testing/btest/core/conn-id.bro | 2 +- testing/btest/logging/rotate-custom.bro | 2 +- 8 files changed, 295 insertions(+), 200 deletions(-) create mode 100644 testing/btest/Makefile diff --git a/testing/btest/Baseline/core.conn-id/counts b/testing/btest/Baseline/core.conn-id/counts index 3c032078a4..a8fa06e1be 100644 --- a/testing/btest/Baseline/core.conn-id/counts +++ b/testing/btest/Baseline/core.conn-id/counts @@ -1 +1 @@ -18 +62 diff --git a/testing/btest/Baseline/core.conn-id/output b/testing/btest/Baseline/core.conn-id/output index ceba6ae7ac..3f7256278e 100644 --- a/testing/btest/Baseline/core.conn-id/output +++ b/testing/btest/Baseline/core.conn-id/output @@ -1,34 +1,78 @@ -[orig_h=141.142.220.118, orig_p=48649/tcp, resp_h=208.80.152.118, resp_p=80/tcp], UWkUyAuUGXf -[orig_h=141.142.220.118, orig_p=48649/tcp, resp_h=208.80.152.118, resp_p=80/tcp], UWkUyAuUGXf -[orig_h=141.142.220.118, orig_p=48649/tcp, resp_h=208.80.152.118, resp_p=80/tcp], UWkUyAuUGXf -[orig_h=141.142.220.118, orig_p=48649/tcp, resp_h=208.80.152.118, resp_p=80/tcp], UWkUyAuUGXf -[orig_h=141.142.220.118, orig_p=49996/tcp, resp_h=208.80.152.3, resp_p=80/tcp], 56gKBmhBBB6 -[orig_h=141.142.220.118, orig_p=49996/tcp, resp_h=208.80.152.3, resp_p=80/tcp], 56gKBmhBBB6 -[orig_h=141.142.220.118, orig_p=49997/tcp, resp_h=208.80.152.3, resp_p=80/tcp], 50da4BEzauh -[orig_h=141.142.220.118, orig_p=49997/tcp, resp_h=208.80.152.3, resp_p=80/tcp], 50da4BEzauh -[orig_h=141.142.220.118, orig_p=49998/tcp, resp_h=208.80.152.3, resp_p=80/tcp], WUjEZFOdSS -[orig_h=141.142.220.118, orig_p=49998/tcp, resp_h=208.80.152.3, resp_p=80/tcp], WUjEZFOdSS -[orig_h=141.142.220.118, orig_p=49999/tcp, resp_h=208.80.152.3, resp_p=80/tcp], ecqdozAET6c -[orig_h=141.142.220.118, orig_p=49999/tcp, resp_h=208.80.152.3, resp_p=80/tcp], ecqdozAET6c -[orig_h=141.142.220.118, orig_p=50000/tcp, resp_h=208.80.152.3, resp_p=80/tcp], tdkrEYpj5ja -[orig_h=141.142.220.118, orig_p=50000/tcp, resp_h=208.80.152.3, resp_p=80/tcp], tdkrEYpj5ja -[orig_h=141.142.220.118, orig_p=50001/tcp, resp_h=208.80.152.3, resp_p=80/tcp], F5XgctwO3Vl -[orig_h=141.142.220.118, orig_p=50001/tcp, resp_h=208.80.152.3, resp_p=80/tcp], F5XgctwO3Vl -[orig_h=141.142.220.118, orig_p=35642/tcp, resp_h=208.80.152.2, resp_p=80/tcp], svqqNKN9CFj -[orig_h=141.142.220.118, orig_p=35642/tcp, resp_h=208.80.152.2, resp_p=80/tcp], svqqNKN9CFj -[orig_h=141.142.220.118, orig_p=49997/tcp, resp_h=208.80.152.3, resp_p=80/tcp], 50da4BEzauh -[orig_h=141.142.220.118, orig_p=49997/tcp, resp_h=208.80.152.3, resp_p=80/tcp], 50da4BEzauh -[orig_h=141.142.220.118, orig_p=49996/tcp, resp_h=208.80.152.3, resp_p=80/tcp], 56gKBmhBBB6 -[orig_h=141.142.220.118, orig_p=49996/tcp, resp_h=208.80.152.3, resp_p=80/tcp], 56gKBmhBBB6 -[orig_h=141.142.220.118, orig_p=49998/tcp, resp_h=208.80.152.3, resp_p=80/tcp], WUjEZFOdSS -[orig_h=141.142.220.118, orig_p=49998/tcp, resp_h=208.80.152.3, resp_p=80/tcp], WUjEZFOdSS -[orig_h=141.142.220.118, orig_p=50000/tcp, resp_h=208.80.152.3, resp_p=80/tcp], tdkrEYpj5ja -[orig_h=141.142.220.118, orig_p=50000/tcp, resp_h=208.80.152.3, resp_p=80/tcp], tdkrEYpj5ja -[orig_h=141.142.220.118, orig_p=49999/tcp, resp_h=208.80.152.3, resp_p=80/tcp], ecqdozAET6c -[orig_h=141.142.220.118, orig_p=49999/tcp, resp_h=208.80.152.3, resp_p=80/tcp], ecqdozAET6c -[orig_h=141.142.220.118, orig_p=50001/tcp, resp_h=208.80.152.3, resp_p=80/tcp], F5XgctwO3Vl -[orig_h=141.142.220.118, orig_p=50001/tcp, resp_h=208.80.152.3, resp_p=80/tcp], F5XgctwO3Vl -[orig_h=141.142.220.118, orig_p=35642/tcp, resp_h=208.80.152.2, resp_p=80/tcp], svqqNKN9CFj -[orig_h=141.142.220.118, orig_p=35642/tcp, resp_h=208.80.152.2, resp_p=80/tcp], svqqNKN9CFj -[orig_h=141.142.220.235, orig_p=6705/tcp, resp_h=173.192.163.128, resp_p=80/tcp], UZkBBvjF0r8 -[orig_h=141.142.220.235, orig_p=6705/tcp, resp_h=173.192.163.128, resp_p=80/tcp], UZkBBvjF0r8 +[orig_h=141.142.220.202, orig_p=5353/udp, resp_h=224.0.0.251, resp_p=5353/udp], UWkUyAuUGXf +[orig_h=141.142.220.202, orig_p=5353/udp, resp_h=224.0.0.251, resp_p=5353/udp], UWkUyAuUGXf +[orig_h=141.142.220.50, orig_p=5353/udp, resp_h=224.0.0.251, resp_p=5353/udp], 56gKBmhBBB6 +[orig_h=141.142.220.50, orig_p=5353/udp, resp_h=224.0.0.251, resp_p=5353/udp], 56gKBmhBBB6 +[orig_h=141.142.220.118, orig_p=35634/tcp, resp_h=208.80.152.2, resp_p=80/tcp], 50da4BEzauh +[orig_h=141.142.220.118, orig_p=35634/tcp, resp_h=208.80.152.2, resp_p=80/tcp], 50da4BEzauh +[orig_h=141.142.220.118, orig_p=48649/tcp, resp_h=208.80.152.118, resp_p=80/tcp], WUjEZFOdSS +[orig_h=141.142.220.118, orig_p=48649/tcp, resp_h=208.80.152.118, resp_p=80/tcp], WUjEZFOdSS +[orig_h=141.142.220.118, orig_p=48649/tcp, resp_h=208.80.152.118, resp_p=80/tcp], WUjEZFOdSS +[orig_h=141.142.220.118, orig_p=48649/tcp, resp_h=208.80.152.118, resp_p=80/tcp], WUjEZFOdSS +[orig_h=141.142.220.118, orig_p=43927/udp, resp_h=141.142.2.2, resp_p=53/udp], ecqdozAET6c +[orig_h=141.142.220.118, orig_p=43927/udp, resp_h=141.142.2.2, resp_p=53/udp], ecqdozAET6c +[orig_h=141.142.220.118, orig_p=37676/udp, resp_h=141.142.2.2, resp_p=53/udp], tdkrEYpj5ja +[orig_h=141.142.220.118, orig_p=37676/udp, resp_h=141.142.2.2, resp_p=53/udp], tdkrEYpj5ja +[orig_h=141.142.220.118, orig_p=40526/udp, resp_h=141.142.2.2, resp_p=53/udp], F5XgctwO3Vl +[orig_h=141.142.220.118, orig_p=40526/udp, resp_h=141.142.2.2, resp_p=53/udp], F5XgctwO3Vl +[orig_h=141.142.220.118, orig_p=49996/tcp, resp_h=208.80.152.3, resp_p=80/tcp], svqqNKN9CFj +[orig_h=141.142.220.118, orig_p=49996/tcp, resp_h=208.80.152.3, resp_p=80/tcp], svqqNKN9CFj +[orig_h=141.142.220.118, orig_p=49997/tcp, resp_h=208.80.152.3, resp_p=80/tcp], UZkBBvjF0r8 +[orig_h=141.142.220.118, orig_p=49997/tcp, resp_h=208.80.152.3, resp_p=80/tcp], UZkBBvjF0r8 +[orig_h=141.142.220.118, orig_p=32902/udp, resp_h=141.142.2.2, resp_p=53/udp], nSEQzFk1LZc +[orig_h=141.142.220.118, orig_p=32902/udp, resp_h=141.142.2.2, resp_p=53/udp], nSEQzFk1LZc +[orig_h=141.142.220.118, orig_p=59816/udp, resp_h=141.142.2.2, resp_p=53/udp], rmXOq6wncn1 +[orig_h=141.142.220.118, orig_p=59816/udp, resp_h=141.142.2.2, resp_p=53/udp], rmXOq6wncn1 +[orig_h=141.142.220.118, orig_p=59714/udp, resp_h=141.142.2.2, resp_p=53/udp], 4YYJTjETe1i +[orig_h=141.142.220.118, orig_p=59714/udp, resp_h=141.142.2.2, resp_p=53/udp], 4YYJTjETe1i +[orig_h=141.142.220.118, orig_p=49998/tcp, resp_h=208.80.152.3, resp_p=80/tcp], OldlyspNIr7 +[orig_h=141.142.220.118, orig_p=49998/tcp, resp_h=208.80.152.3, resp_p=80/tcp], OldlyspNIr7 +[orig_h=141.142.220.118, orig_p=58206/udp, resp_h=141.142.2.2, resp_p=53/udp], R8BqVlcp23e +[orig_h=141.142.220.118, orig_p=58206/udp, resp_h=141.142.2.2, resp_p=53/udp], R8BqVlcp23e +[orig_h=141.142.220.118, orig_p=38911/udp, resp_h=141.142.2.2, resp_p=53/udp], duYdXg7bTa3 +[orig_h=141.142.220.118, orig_p=38911/udp, resp_h=141.142.2.2, resp_p=53/udp], duYdXg7bTa3 +[orig_h=141.142.220.118, orig_p=59746/udp, resp_h=141.142.2.2, resp_p=53/udp], yzqaQTU9DXe +[orig_h=141.142.220.118, orig_p=59746/udp, resp_h=141.142.2.2, resp_p=53/udp], yzqaQTU9DXe +[orig_h=141.142.220.118, orig_p=49999/tcp, resp_h=208.80.152.3, resp_p=80/tcp], OPM7xFSDNw3 +[orig_h=141.142.220.118, orig_p=49999/tcp, resp_h=208.80.152.3, resp_p=80/tcp], OPM7xFSDNw3 +[orig_h=141.142.220.118, orig_p=50000/tcp, resp_h=208.80.152.3, resp_p=80/tcp], j5w2LueK8Ti +[orig_h=141.142.220.118, orig_p=50000/tcp, resp_h=208.80.152.3, resp_p=80/tcp], j5w2LueK8Ti +[orig_h=141.142.220.118, orig_p=45000/udp, resp_h=141.142.2.2, resp_p=53/udp], N6rbUGwigQ7 +[orig_h=141.142.220.118, orig_p=45000/udp, resp_h=141.142.2.2, resp_p=53/udp], N6rbUGwigQ7 +[orig_h=141.142.220.118, orig_p=48479/udp, resp_h=141.142.2.2, resp_p=53/udp], 8b9q7qPtzhd +[orig_h=141.142.220.118, orig_p=48479/udp, resp_h=141.142.2.2, resp_p=53/udp], 8b9q7qPtzhd +[orig_h=141.142.220.118, orig_p=48128/udp, resp_h=141.142.2.2, resp_p=53/udp], KOdlL7sC9z2 +[orig_h=141.142.220.118, orig_p=48128/udp, resp_h=141.142.2.2, resp_p=53/udp], KOdlL7sC9z2 +[orig_h=141.142.220.118, orig_p=50001/tcp, resp_h=208.80.152.3, resp_p=80/tcp], hvOo97vj60k +[orig_h=141.142.220.118, orig_p=50001/tcp, resp_h=208.80.152.3, resp_p=80/tcp], hvOo97vj60k +[orig_h=141.142.220.118, orig_p=56056/udp, resp_h=141.142.2.2, resp_p=53/udp], FHu81uYujA9 +[orig_h=141.142.220.118, orig_p=56056/udp, resp_h=141.142.2.2, resp_p=53/udp], FHu81uYujA9 +[orig_h=141.142.220.118, orig_p=55092/udp, resp_h=141.142.2.2, resp_p=53/udp], 2M1wDTa0C7a +[orig_h=141.142.220.118, orig_p=55092/udp, resp_h=141.142.2.2, resp_p=53/udp], 2M1wDTa0C7a +[orig_h=141.142.220.118, orig_p=35642/tcp, resp_h=208.80.152.2, resp_p=80/tcp], OKiJdtzKWPk +[orig_h=141.142.220.118, orig_p=35642/tcp, resp_h=208.80.152.2, resp_p=80/tcp], OKiJdtzKWPk +[orig_h=141.142.220.118, orig_p=49997/tcp, resp_h=208.80.152.3, resp_p=80/tcp], UZkBBvjF0r8 +[orig_h=141.142.220.118, orig_p=49997/tcp, resp_h=208.80.152.3, resp_p=80/tcp], UZkBBvjF0r8 +[orig_h=141.142.220.118, orig_p=49996/tcp, resp_h=208.80.152.3, resp_p=80/tcp], svqqNKN9CFj +[orig_h=141.142.220.118, orig_p=49996/tcp, resp_h=208.80.152.3, resp_p=80/tcp], svqqNKN9CFj +[orig_h=141.142.220.118, orig_p=49998/tcp, resp_h=208.80.152.3, resp_p=80/tcp], OldlyspNIr7 +[orig_h=141.142.220.118, orig_p=49998/tcp, resp_h=208.80.152.3, resp_p=80/tcp], OldlyspNIr7 +[orig_h=141.142.220.118, orig_p=50000/tcp, resp_h=208.80.152.3, resp_p=80/tcp], j5w2LueK8Ti +[orig_h=141.142.220.118, orig_p=50000/tcp, resp_h=208.80.152.3, resp_p=80/tcp], j5w2LueK8Ti +[orig_h=141.142.220.118, orig_p=49999/tcp, resp_h=208.80.152.3, resp_p=80/tcp], OPM7xFSDNw3 +[orig_h=141.142.220.118, orig_p=49999/tcp, resp_h=208.80.152.3, resp_p=80/tcp], OPM7xFSDNw3 +[orig_h=141.142.220.118, orig_p=50001/tcp, resp_h=208.80.152.3, resp_p=80/tcp], hvOo97vj60k +[orig_h=141.142.220.118, orig_p=50001/tcp, resp_h=208.80.152.3, resp_p=80/tcp], hvOo97vj60k +[orig_h=141.142.220.118, orig_p=35642/tcp, resp_h=208.80.152.2, resp_p=80/tcp], OKiJdtzKWPk +[orig_h=141.142.220.118, orig_p=35642/tcp, resp_h=208.80.152.2, resp_p=80/tcp], OKiJdtzKWPk +[orig_h=141.142.220.235, orig_p=6705/tcp, resp_h=173.192.163.128, resp_p=80/tcp], tpUWfNdSLE +[orig_h=141.142.220.235, orig_p=6705/tcp, resp_h=173.192.163.128, resp_p=80/tcp], tpUWfNdSLE +[orig_h=141.142.220.44, orig_p=5353/udp, resp_h=224.0.0.251, resp_p=5353/udp], ra1C6ZLut4b +[orig_h=141.142.220.44, orig_p=5353/udp, resp_h=224.0.0.251, resp_p=5353/udp], ra1C6ZLut4b +[orig_h=141.142.220.226, orig_p=137/udp, resp_h=141.142.220.255, resp_p=137/udp], UElDH5b9qA5 +[orig_h=141.142.220.226, orig_p=137/udp, resp_h=141.142.220.255, resp_p=137/udp], UElDH5b9qA5 +[orig_h=141.142.220.226, orig_p=55131/udp, resp_h=224.0.0.252, resp_p=5355/udp], sO3mBXBav1h +[orig_h=141.142.220.226, orig_p=55131/udp, resp_h=224.0.0.252, resp_p=5355/udp], sO3mBXBav1h +[orig_h=141.142.220.226, orig_p=55671/udp, resp_h=224.0.0.252, resp_p=5355/udp], xAQqZE8Wdp4 +[orig_h=141.142.220.226, orig_p=55671/udp, resp_h=224.0.0.252, resp_p=5355/udp], xAQqZE8Wdp4 +[orig_h=141.142.220.238, orig_p=56641/udp, resp_h=141.142.220.255, resp_p=137/udp], zVecVnfOlsf +[orig_h=141.142.220.238, orig_p=56641/udp, resp_h=141.142.220.255, resp_p=137/udp], zVecVnfOlsf diff --git a/testing/btest/Baseline/core.conn-id/output.cc b/testing/btest/Baseline/core.conn-id/output.cc index a980322f50..f03a74f541 100644 --- a/testing/btest/Baseline/core.conn-id/output.cc +++ b/testing/btest/Baseline/core.conn-id/output.cc @@ -1,36 +1,80 @@ -[orig_h=141.142.220.118, orig_p=48649/tcp, resp_h=208.80.152.118, resp_p=80/tcp], UWkUyAuUGXf -[orig_h=141.142.220.118, orig_p=48649/tcp, resp_h=208.80.152.118, resp_p=80/tcp], UWkUyAuUGXf -[orig_h=141.142.220.118, orig_p=48649/tcp, resp_h=208.80.152.118, resp_p=80/tcp], UWkUyAuUGXf -[orig_h=141.142.220.118, orig_p=48649/tcp, resp_h=208.80.152.118, resp_p=80/tcp], UWkUyAuUGXf -[orig_h=141.142.220.118, orig_p=49996/tcp, resp_h=208.80.152.3, resp_p=80/tcp], 56gKBmhBBB6 -[orig_h=141.142.220.118, orig_p=49996/tcp, resp_h=208.80.152.3, resp_p=80/tcp], 56gKBmhBBB6 -[orig_h=141.142.220.118, orig_p=49997/tcp, resp_h=208.80.152.3, resp_p=80/tcp], 50da4BEzauh -[orig_h=141.142.220.118, orig_p=49997/tcp, resp_h=208.80.152.3, resp_p=80/tcp], 50da4BEzauh -[orig_h=141.142.220.118, orig_p=49998/tcp, resp_h=208.80.152.3, resp_p=80/tcp], WUjEZFOdSS -[orig_h=141.142.220.118, orig_p=49998/tcp, resp_h=208.80.152.3, resp_p=80/tcp], WUjEZFOdSS -[orig_h=141.142.220.118, orig_p=49999/tcp, resp_h=208.80.152.3, resp_p=80/tcp], ecqdozAET6c -[orig_h=141.142.220.118, orig_p=49999/tcp, resp_h=208.80.152.3, resp_p=80/tcp], ecqdozAET6c -[orig_h=141.142.220.118, orig_p=50000/tcp, resp_h=208.80.152.3, resp_p=80/tcp], tdkrEYpj5ja -[orig_h=141.142.220.118, orig_p=50000/tcp, resp_h=208.80.152.3, resp_p=80/tcp], tdkrEYpj5ja -[orig_h=141.142.220.118, orig_p=50001/tcp, resp_h=208.80.152.3, resp_p=80/tcp], F5XgctwO3Vl -[orig_h=141.142.220.118, orig_p=50001/tcp, resp_h=208.80.152.3, resp_p=80/tcp], F5XgctwO3Vl -[orig_h=141.142.220.118, orig_p=35642/tcp, resp_h=208.80.152.2, resp_p=80/tcp], svqqNKN9CFj -[orig_h=141.142.220.118, orig_p=35642/tcp, resp_h=208.80.152.2, resp_p=80/tcp], svqqNKN9CFj -[orig_h=141.142.220.118, orig_p=49997/tcp, resp_h=208.80.152.3, resp_p=80/tcp], 50da4BEzauh -[orig_h=141.142.220.118, orig_p=49997/tcp, resp_h=208.80.152.3, resp_p=80/tcp], 50da4BEzauh -[orig_h=141.142.220.118, orig_p=49996/tcp, resp_h=208.80.152.3, resp_p=80/tcp], 56gKBmhBBB6 -[orig_h=141.142.220.118, orig_p=49996/tcp, resp_h=208.80.152.3, resp_p=80/tcp], 56gKBmhBBB6 -[orig_h=141.142.220.118, orig_p=49998/tcp, resp_h=208.80.152.3, resp_p=80/tcp], WUjEZFOdSS -[orig_h=141.142.220.118, orig_p=49998/tcp, resp_h=208.80.152.3, resp_p=80/tcp], WUjEZFOdSS -[orig_h=141.142.220.118, orig_p=50000/tcp, resp_h=208.80.152.3, resp_p=80/tcp], tdkrEYpj5ja -[orig_h=141.142.220.118, orig_p=50000/tcp, resp_h=208.80.152.3, resp_p=80/tcp], tdkrEYpj5ja -[orig_h=141.142.220.118, orig_p=49999/tcp, resp_h=208.80.152.3, resp_p=80/tcp], ecqdozAET6c -[orig_h=141.142.220.118, orig_p=49999/tcp, resp_h=208.80.152.3, resp_p=80/tcp], ecqdozAET6c -[orig_h=141.142.220.118, orig_p=50001/tcp, resp_h=208.80.152.3, resp_p=80/tcp], F5XgctwO3Vl -[orig_h=141.142.220.118, orig_p=50001/tcp, resp_h=208.80.152.3, resp_p=80/tcp], F5XgctwO3Vl -[orig_h=141.142.220.118, orig_p=35642/tcp, resp_h=208.80.152.2, resp_p=80/tcp], svqqNKN9CFj -[orig_h=141.142.220.118, orig_p=35642/tcp, resp_h=208.80.152.2, resp_p=80/tcp], svqqNKN9CFj -[orig_h=141.142.220.235, orig_p=6705/tcp, resp_h=173.192.163.128, resp_p=80/tcp], UZkBBvjF0r8 -[orig_h=141.142.220.235, orig_p=6705/tcp, resp_h=173.192.163.128, resp_p=80/tcp], UZkBBvjF0r8 -[orig_h=141.142.220.235, orig_p=6705/tcp, resp_h=173.192.163.128, resp_p=80/tcp], UZkBBvjF0r8 -[orig_h=141.142.220.235, orig_p=6705/tcp, resp_h=173.192.163.128, resp_p=80/tcp], UZkBBvjF0r8 +[orig_h=141.142.220.202, orig_p=5353/udp, resp_h=224.0.0.251, resp_p=5353/udp], UWkUyAuUGXf +[orig_h=141.142.220.202, orig_p=5353/udp, resp_h=224.0.0.251, resp_p=5353/udp], UWkUyAuUGXf +[orig_h=141.142.220.50, orig_p=5353/udp, resp_h=224.0.0.251, resp_p=5353/udp], 56gKBmhBBB6 +[orig_h=141.142.220.50, orig_p=5353/udp, resp_h=224.0.0.251, resp_p=5353/udp], 56gKBmhBBB6 +[orig_h=141.142.220.118, orig_p=35634/tcp, resp_h=208.80.152.2, resp_p=80/tcp], 50da4BEzauh +[orig_h=141.142.220.118, orig_p=35634/tcp, resp_h=208.80.152.2, resp_p=80/tcp], 50da4BEzauh +[orig_h=141.142.220.118, orig_p=48649/tcp, resp_h=208.80.152.118, resp_p=80/tcp], WUjEZFOdSS +[orig_h=141.142.220.118, orig_p=48649/tcp, resp_h=208.80.152.118, resp_p=80/tcp], WUjEZFOdSS +[orig_h=141.142.220.118, orig_p=48649/tcp, resp_h=208.80.152.118, resp_p=80/tcp], WUjEZFOdSS +[orig_h=141.142.220.118, orig_p=48649/tcp, resp_h=208.80.152.118, resp_p=80/tcp], WUjEZFOdSS +[orig_h=141.142.220.118, orig_p=43927/udp, resp_h=141.142.2.2, resp_p=53/udp], ecqdozAET6c +[orig_h=141.142.220.118, orig_p=43927/udp, resp_h=141.142.2.2, resp_p=53/udp], ecqdozAET6c +[orig_h=141.142.220.118, orig_p=37676/udp, resp_h=141.142.2.2, resp_p=53/udp], tdkrEYpj5ja +[orig_h=141.142.220.118, orig_p=37676/udp, resp_h=141.142.2.2, resp_p=53/udp], tdkrEYpj5ja +[orig_h=141.142.220.118, orig_p=40526/udp, resp_h=141.142.2.2, resp_p=53/udp], F5XgctwO3Vl +[orig_h=141.142.220.118, orig_p=40526/udp, resp_h=141.142.2.2, resp_p=53/udp], F5XgctwO3Vl +[orig_h=141.142.220.118, orig_p=49996/tcp, resp_h=208.80.152.3, resp_p=80/tcp], svqqNKN9CFj +[orig_h=141.142.220.118, orig_p=49996/tcp, resp_h=208.80.152.3, resp_p=80/tcp], svqqNKN9CFj +[orig_h=141.142.220.118, orig_p=49997/tcp, resp_h=208.80.152.3, resp_p=80/tcp], UZkBBvjF0r8 +[orig_h=141.142.220.118, orig_p=49997/tcp, resp_h=208.80.152.3, resp_p=80/tcp], UZkBBvjF0r8 +[orig_h=141.142.220.118, orig_p=32902/udp, resp_h=141.142.2.2, resp_p=53/udp], nSEQzFk1LZc +[orig_h=141.142.220.118, orig_p=32902/udp, resp_h=141.142.2.2, resp_p=53/udp], nSEQzFk1LZc +[orig_h=141.142.220.118, orig_p=59816/udp, resp_h=141.142.2.2, resp_p=53/udp], rmXOq6wncn1 +[orig_h=141.142.220.118, orig_p=59816/udp, resp_h=141.142.2.2, resp_p=53/udp], rmXOq6wncn1 +[orig_h=141.142.220.118, orig_p=59714/udp, resp_h=141.142.2.2, resp_p=53/udp], 4YYJTjETe1i +[orig_h=141.142.220.118, orig_p=59714/udp, resp_h=141.142.2.2, resp_p=53/udp], 4YYJTjETe1i +[orig_h=141.142.220.118, orig_p=49998/tcp, resp_h=208.80.152.3, resp_p=80/tcp], OldlyspNIr7 +[orig_h=141.142.220.118, orig_p=49998/tcp, resp_h=208.80.152.3, resp_p=80/tcp], OldlyspNIr7 +[orig_h=141.142.220.118, orig_p=58206/udp, resp_h=141.142.2.2, resp_p=53/udp], R8BqVlcp23e +[orig_h=141.142.220.118, orig_p=58206/udp, resp_h=141.142.2.2, resp_p=53/udp], R8BqVlcp23e +[orig_h=141.142.220.118, orig_p=38911/udp, resp_h=141.142.2.2, resp_p=53/udp], duYdXg7bTa3 +[orig_h=141.142.220.118, orig_p=38911/udp, resp_h=141.142.2.2, resp_p=53/udp], duYdXg7bTa3 +[orig_h=141.142.220.118, orig_p=59746/udp, resp_h=141.142.2.2, resp_p=53/udp], yzqaQTU9DXe +[orig_h=141.142.220.118, orig_p=59746/udp, resp_h=141.142.2.2, resp_p=53/udp], yzqaQTU9DXe +[orig_h=141.142.220.118, orig_p=49999/tcp, resp_h=208.80.152.3, resp_p=80/tcp], OPM7xFSDNw3 +[orig_h=141.142.220.118, orig_p=49999/tcp, resp_h=208.80.152.3, resp_p=80/tcp], OPM7xFSDNw3 +[orig_h=141.142.220.118, orig_p=50000/tcp, resp_h=208.80.152.3, resp_p=80/tcp], j5w2LueK8Ti +[orig_h=141.142.220.118, orig_p=50000/tcp, resp_h=208.80.152.3, resp_p=80/tcp], j5w2LueK8Ti +[orig_h=141.142.220.118, orig_p=45000/udp, resp_h=141.142.2.2, resp_p=53/udp], N6rbUGwigQ7 +[orig_h=141.142.220.118, orig_p=45000/udp, resp_h=141.142.2.2, resp_p=53/udp], N6rbUGwigQ7 +[orig_h=141.142.220.118, orig_p=48479/udp, resp_h=141.142.2.2, resp_p=53/udp], 8b9q7qPtzhd +[orig_h=141.142.220.118, orig_p=48479/udp, resp_h=141.142.2.2, resp_p=53/udp], 8b9q7qPtzhd +[orig_h=141.142.220.118, orig_p=48128/udp, resp_h=141.142.2.2, resp_p=53/udp], KOdlL7sC9z2 +[orig_h=141.142.220.118, orig_p=48128/udp, resp_h=141.142.2.2, resp_p=53/udp], KOdlL7sC9z2 +[orig_h=141.142.220.118, orig_p=50001/tcp, resp_h=208.80.152.3, resp_p=80/tcp], hvOo97vj60k +[orig_h=141.142.220.118, orig_p=50001/tcp, resp_h=208.80.152.3, resp_p=80/tcp], hvOo97vj60k +[orig_h=141.142.220.118, orig_p=56056/udp, resp_h=141.142.2.2, resp_p=53/udp], FHu81uYujA9 +[orig_h=141.142.220.118, orig_p=56056/udp, resp_h=141.142.2.2, resp_p=53/udp], FHu81uYujA9 +[orig_h=141.142.220.118, orig_p=55092/udp, resp_h=141.142.2.2, resp_p=53/udp], 2M1wDTa0C7a +[orig_h=141.142.220.118, orig_p=55092/udp, resp_h=141.142.2.2, resp_p=53/udp], 2M1wDTa0C7a +[orig_h=141.142.220.118, orig_p=35642/tcp, resp_h=208.80.152.2, resp_p=80/tcp], OKiJdtzKWPk +[orig_h=141.142.220.118, orig_p=35642/tcp, resp_h=208.80.152.2, resp_p=80/tcp], OKiJdtzKWPk +[orig_h=141.142.220.118, orig_p=49997/tcp, resp_h=208.80.152.3, resp_p=80/tcp], UZkBBvjF0r8 +[orig_h=141.142.220.118, orig_p=49997/tcp, resp_h=208.80.152.3, resp_p=80/tcp], UZkBBvjF0r8 +[orig_h=141.142.220.118, orig_p=49996/tcp, resp_h=208.80.152.3, resp_p=80/tcp], svqqNKN9CFj +[orig_h=141.142.220.118, orig_p=49996/tcp, resp_h=208.80.152.3, resp_p=80/tcp], svqqNKN9CFj +[orig_h=141.142.220.118, orig_p=49998/tcp, resp_h=208.80.152.3, resp_p=80/tcp], OldlyspNIr7 +[orig_h=141.142.220.118, orig_p=49998/tcp, resp_h=208.80.152.3, resp_p=80/tcp], OldlyspNIr7 +[orig_h=141.142.220.118, orig_p=50000/tcp, resp_h=208.80.152.3, resp_p=80/tcp], j5w2LueK8Ti +[orig_h=141.142.220.118, orig_p=50000/tcp, resp_h=208.80.152.3, resp_p=80/tcp], j5w2LueK8Ti +[orig_h=141.142.220.118, orig_p=49999/tcp, resp_h=208.80.152.3, resp_p=80/tcp], OPM7xFSDNw3 +[orig_h=141.142.220.118, orig_p=49999/tcp, resp_h=208.80.152.3, resp_p=80/tcp], OPM7xFSDNw3 +[orig_h=141.142.220.118, orig_p=50001/tcp, resp_h=208.80.152.3, resp_p=80/tcp], hvOo97vj60k +[orig_h=141.142.220.118, orig_p=50001/tcp, resp_h=208.80.152.3, resp_p=80/tcp], hvOo97vj60k +[orig_h=141.142.220.118, orig_p=35642/tcp, resp_h=208.80.152.2, resp_p=80/tcp], OKiJdtzKWPk +[orig_h=141.142.220.118, orig_p=35642/tcp, resp_h=208.80.152.2, resp_p=80/tcp], OKiJdtzKWPk +[orig_h=141.142.220.235, orig_p=6705/tcp, resp_h=173.192.163.128, resp_p=80/tcp], tpUWfNdSLE +[orig_h=141.142.220.235, orig_p=6705/tcp, resp_h=173.192.163.128, resp_p=80/tcp], tpUWfNdSLE +[orig_h=141.142.220.235, orig_p=6705/tcp, resp_h=173.192.163.128, resp_p=80/tcp], tpUWfNdSLE +[orig_h=141.142.220.235, orig_p=6705/tcp, resp_h=173.192.163.128, resp_p=80/tcp], tpUWfNdSLE +[orig_h=141.142.220.44, orig_p=5353/udp, resp_h=224.0.0.251, resp_p=5353/udp], ra1C6ZLut4b +[orig_h=141.142.220.44, orig_p=5353/udp, resp_h=224.0.0.251, resp_p=5353/udp], ra1C6ZLut4b +[orig_h=141.142.220.226, orig_p=137/udp, resp_h=141.142.220.255, resp_p=137/udp], UElDH5b9qA5 +[orig_h=141.142.220.226, orig_p=137/udp, resp_h=141.142.220.255, resp_p=137/udp], UElDH5b9qA5 +[orig_h=141.142.220.226, orig_p=55131/udp, resp_h=224.0.0.252, resp_p=5355/udp], sO3mBXBav1h +[orig_h=141.142.220.226, orig_p=55131/udp, resp_h=224.0.0.252, resp_p=5355/udp], sO3mBXBav1h +[orig_h=141.142.220.226, orig_p=55671/udp, resp_h=224.0.0.252, resp_p=5355/udp], xAQqZE8Wdp4 +[orig_h=141.142.220.226, orig_p=55671/udp, resp_h=224.0.0.252, resp_p=5355/udp], xAQqZE8Wdp4 +[orig_h=141.142.220.238, orig_p=56641/udp, resp_h=141.142.220.255, resp_p=137/udp], zVecVnfOlsf +[orig_h=141.142.220.238, orig_p=56641/udp, resp_h=141.142.220.255, resp_p=137/udp], zVecVnfOlsf diff --git a/testing/btest/Baseline/core.conn-id/output.cc2 b/testing/btest/Baseline/core.conn-id/output.cc2 index ceba6ae7ac..3f7256278e 100644 --- a/testing/btest/Baseline/core.conn-id/output.cc2 +++ b/testing/btest/Baseline/core.conn-id/output.cc2 @@ -1,34 +1,78 @@ -[orig_h=141.142.220.118, orig_p=48649/tcp, resp_h=208.80.152.118, resp_p=80/tcp], UWkUyAuUGXf -[orig_h=141.142.220.118, orig_p=48649/tcp, resp_h=208.80.152.118, resp_p=80/tcp], UWkUyAuUGXf -[orig_h=141.142.220.118, orig_p=48649/tcp, resp_h=208.80.152.118, resp_p=80/tcp], UWkUyAuUGXf -[orig_h=141.142.220.118, orig_p=48649/tcp, resp_h=208.80.152.118, resp_p=80/tcp], UWkUyAuUGXf -[orig_h=141.142.220.118, orig_p=49996/tcp, resp_h=208.80.152.3, resp_p=80/tcp], 56gKBmhBBB6 -[orig_h=141.142.220.118, orig_p=49996/tcp, resp_h=208.80.152.3, resp_p=80/tcp], 56gKBmhBBB6 -[orig_h=141.142.220.118, orig_p=49997/tcp, resp_h=208.80.152.3, resp_p=80/tcp], 50da4BEzauh -[orig_h=141.142.220.118, orig_p=49997/tcp, resp_h=208.80.152.3, resp_p=80/tcp], 50da4BEzauh -[orig_h=141.142.220.118, orig_p=49998/tcp, resp_h=208.80.152.3, resp_p=80/tcp], WUjEZFOdSS -[orig_h=141.142.220.118, orig_p=49998/tcp, resp_h=208.80.152.3, resp_p=80/tcp], WUjEZFOdSS -[orig_h=141.142.220.118, orig_p=49999/tcp, resp_h=208.80.152.3, resp_p=80/tcp], ecqdozAET6c -[orig_h=141.142.220.118, orig_p=49999/tcp, resp_h=208.80.152.3, resp_p=80/tcp], ecqdozAET6c -[orig_h=141.142.220.118, orig_p=50000/tcp, resp_h=208.80.152.3, resp_p=80/tcp], tdkrEYpj5ja -[orig_h=141.142.220.118, orig_p=50000/tcp, resp_h=208.80.152.3, resp_p=80/tcp], tdkrEYpj5ja -[orig_h=141.142.220.118, orig_p=50001/tcp, resp_h=208.80.152.3, resp_p=80/tcp], F5XgctwO3Vl -[orig_h=141.142.220.118, orig_p=50001/tcp, resp_h=208.80.152.3, resp_p=80/tcp], F5XgctwO3Vl -[orig_h=141.142.220.118, orig_p=35642/tcp, resp_h=208.80.152.2, resp_p=80/tcp], svqqNKN9CFj -[orig_h=141.142.220.118, orig_p=35642/tcp, resp_h=208.80.152.2, resp_p=80/tcp], svqqNKN9CFj -[orig_h=141.142.220.118, orig_p=49997/tcp, resp_h=208.80.152.3, resp_p=80/tcp], 50da4BEzauh -[orig_h=141.142.220.118, orig_p=49997/tcp, resp_h=208.80.152.3, resp_p=80/tcp], 50da4BEzauh -[orig_h=141.142.220.118, orig_p=49996/tcp, resp_h=208.80.152.3, resp_p=80/tcp], 56gKBmhBBB6 -[orig_h=141.142.220.118, orig_p=49996/tcp, resp_h=208.80.152.3, resp_p=80/tcp], 56gKBmhBBB6 -[orig_h=141.142.220.118, orig_p=49998/tcp, resp_h=208.80.152.3, resp_p=80/tcp], WUjEZFOdSS -[orig_h=141.142.220.118, orig_p=49998/tcp, resp_h=208.80.152.3, resp_p=80/tcp], WUjEZFOdSS -[orig_h=141.142.220.118, orig_p=50000/tcp, resp_h=208.80.152.3, resp_p=80/tcp], tdkrEYpj5ja -[orig_h=141.142.220.118, orig_p=50000/tcp, resp_h=208.80.152.3, resp_p=80/tcp], tdkrEYpj5ja -[orig_h=141.142.220.118, orig_p=49999/tcp, resp_h=208.80.152.3, resp_p=80/tcp], ecqdozAET6c -[orig_h=141.142.220.118, orig_p=49999/tcp, resp_h=208.80.152.3, resp_p=80/tcp], ecqdozAET6c -[orig_h=141.142.220.118, orig_p=50001/tcp, resp_h=208.80.152.3, resp_p=80/tcp], F5XgctwO3Vl -[orig_h=141.142.220.118, orig_p=50001/tcp, resp_h=208.80.152.3, resp_p=80/tcp], F5XgctwO3Vl -[orig_h=141.142.220.118, orig_p=35642/tcp, resp_h=208.80.152.2, resp_p=80/tcp], svqqNKN9CFj -[orig_h=141.142.220.118, orig_p=35642/tcp, resp_h=208.80.152.2, resp_p=80/tcp], svqqNKN9CFj -[orig_h=141.142.220.235, orig_p=6705/tcp, resp_h=173.192.163.128, resp_p=80/tcp], UZkBBvjF0r8 -[orig_h=141.142.220.235, orig_p=6705/tcp, resp_h=173.192.163.128, resp_p=80/tcp], UZkBBvjF0r8 +[orig_h=141.142.220.202, orig_p=5353/udp, resp_h=224.0.0.251, resp_p=5353/udp], UWkUyAuUGXf +[orig_h=141.142.220.202, orig_p=5353/udp, resp_h=224.0.0.251, resp_p=5353/udp], UWkUyAuUGXf +[orig_h=141.142.220.50, orig_p=5353/udp, resp_h=224.0.0.251, resp_p=5353/udp], 56gKBmhBBB6 +[orig_h=141.142.220.50, orig_p=5353/udp, resp_h=224.0.0.251, resp_p=5353/udp], 56gKBmhBBB6 +[orig_h=141.142.220.118, orig_p=35634/tcp, resp_h=208.80.152.2, resp_p=80/tcp], 50da4BEzauh +[orig_h=141.142.220.118, orig_p=35634/tcp, resp_h=208.80.152.2, resp_p=80/tcp], 50da4BEzauh +[orig_h=141.142.220.118, orig_p=48649/tcp, resp_h=208.80.152.118, resp_p=80/tcp], WUjEZFOdSS +[orig_h=141.142.220.118, orig_p=48649/tcp, resp_h=208.80.152.118, resp_p=80/tcp], WUjEZFOdSS +[orig_h=141.142.220.118, orig_p=48649/tcp, resp_h=208.80.152.118, resp_p=80/tcp], WUjEZFOdSS +[orig_h=141.142.220.118, orig_p=48649/tcp, resp_h=208.80.152.118, resp_p=80/tcp], WUjEZFOdSS +[orig_h=141.142.220.118, orig_p=43927/udp, resp_h=141.142.2.2, resp_p=53/udp], ecqdozAET6c +[orig_h=141.142.220.118, orig_p=43927/udp, resp_h=141.142.2.2, resp_p=53/udp], ecqdozAET6c +[orig_h=141.142.220.118, orig_p=37676/udp, resp_h=141.142.2.2, resp_p=53/udp], tdkrEYpj5ja +[orig_h=141.142.220.118, orig_p=37676/udp, resp_h=141.142.2.2, resp_p=53/udp], tdkrEYpj5ja +[orig_h=141.142.220.118, orig_p=40526/udp, resp_h=141.142.2.2, resp_p=53/udp], F5XgctwO3Vl +[orig_h=141.142.220.118, orig_p=40526/udp, resp_h=141.142.2.2, resp_p=53/udp], F5XgctwO3Vl +[orig_h=141.142.220.118, orig_p=49996/tcp, resp_h=208.80.152.3, resp_p=80/tcp], svqqNKN9CFj +[orig_h=141.142.220.118, orig_p=49996/tcp, resp_h=208.80.152.3, resp_p=80/tcp], svqqNKN9CFj +[orig_h=141.142.220.118, orig_p=49997/tcp, resp_h=208.80.152.3, resp_p=80/tcp], UZkBBvjF0r8 +[orig_h=141.142.220.118, orig_p=49997/tcp, resp_h=208.80.152.3, resp_p=80/tcp], UZkBBvjF0r8 +[orig_h=141.142.220.118, orig_p=32902/udp, resp_h=141.142.2.2, resp_p=53/udp], nSEQzFk1LZc +[orig_h=141.142.220.118, orig_p=32902/udp, resp_h=141.142.2.2, resp_p=53/udp], nSEQzFk1LZc +[orig_h=141.142.220.118, orig_p=59816/udp, resp_h=141.142.2.2, resp_p=53/udp], rmXOq6wncn1 +[orig_h=141.142.220.118, orig_p=59816/udp, resp_h=141.142.2.2, resp_p=53/udp], rmXOq6wncn1 +[orig_h=141.142.220.118, orig_p=59714/udp, resp_h=141.142.2.2, resp_p=53/udp], 4YYJTjETe1i +[orig_h=141.142.220.118, orig_p=59714/udp, resp_h=141.142.2.2, resp_p=53/udp], 4YYJTjETe1i +[orig_h=141.142.220.118, orig_p=49998/tcp, resp_h=208.80.152.3, resp_p=80/tcp], OldlyspNIr7 +[orig_h=141.142.220.118, orig_p=49998/tcp, resp_h=208.80.152.3, resp_p=80/tcp], OldlyspNIr7 +[orig_h=141.142.220.118, orig_p=58206/udp, resp_h=141.142.2.2, resp_p=53/udp], R8BqVlcp23e +[orig_h=141.142.220.118, orig_p=58206/udp, resp_h=141.142.2.2, resp_p=53/udp], R8BqVlcp23e +[orig_h=141.142.220.118, orig_p=38911/udp, resp_h=141.142.2.2, resp_p=53/udp], duYdXg7bTa3 +[orig_h=141.142.220.118, orig_p=38911/udp, resp_h=141.142.2.2, resp_p=53/udp], duYdXg7bTa3 +[orig_h=141.142.220.118, orig_p=59746/udp, resp_h=141.142.2.2, resp_p=53/udp], yzqaQTU9DXe +[orig_h=141.142.220.118, orig_p=59746/udp, resp_h=141.142.2.2, resp_p=53/udp], yzqaQTU9DXe +[orig_h=141.142.220.118, orig_p=49999/tcp, resp_h=208.80.152.3, resp_p=80/tcp], OPM7xFSDNw3 +[orig_h=141.142.220.118, orig_p=49999/tcp, resp_h=208.80.152.3, resp_p=80/tcp], OPM7xFSDNw3 +[orig_h=141.142.220.118, orig_p=50000/tcp, resp_h=208.80.152.3, resp_p=80/tcp], j5w2LueK8Ti +[orig_h=141.142.220.118, orig_p=50000/tcp, resp_h=208.80.152.3, resp_p=80/tcp], j5w2LueK8Ti +[orig_h=141.142.220.118, orig_p=45000/udp, resp_h=141.142.2.2, resp_p=53/udp], N6rbUGwigQ7 +[orig_h=141.142.220.118, orig_p=45000/udp, resp_h=141.142.2.2, resp_p=53/udp], N6rbUGwigQ7 +[orig_h=141.142.220.118, orig_p=48479/udp, resp_h=141.142.2.2, resp_p=53/udp], 8b9q7qPtzhd +[orig_h=141.142.220.118, orig_p=48479/udp, resp_h=141.142.2.2, resp_p=53/udp], 8b9q7qPtzhd +[orig_h=141.142.220.118, orig_p=48128/udp, resp_h=141.142.2.2, resp_p=53/udp], KOdlL7sC9z2 +[orig_h=141.142.220.118, orig_p=48128/udp, resp_h=141.142.2.2, resp_p=53/udp], KOdlL7sC9z2 +[orig_h=141.142.220.118, orig_p=50001/tcp, resp_h=208.80.152.3, resp_p=80/tcp], hvOo97vj60k +[orig_h=141.142.220.118, orig_p=50001/tcp, resp_h=208.80.152.3, resp_p=80/tcp], hvOo97vj60k +[orig_h=141.142.220.118, orig_p=56056/udp, resp_h=141.142.2.2, resp_p=53/udp], FHu81uYujA9 +[orig_h=141.142.220.118, orig_p=56056/udp, resp_h=141.142.2.2, resp_p=53/udp], FHu81uYujA9 +[orig_h=141.142.220.118, orig_p=55092/udp, resp_h=141.142.2.2, resp_p=53/udp], 2M1wDTa0C7a +[orig_h=141.142.220.118, orig_p=55092/udp, resp_h=141.142.2.2, resp_p=53/udp], 2M1wDTa0C7a +[orig_h=141.142.220.118, orig_p=35642/tcp, resp_h=208.80.152.2, resp_p=80/tcp], OKiJdtzKWPk +[orig_h=141.142.220.118, orig_p=35642/tcp, resp_h=208.80.152.2, resp_p=80/tcp], OKiJdtzKWPk +[orig_h=141.142.220.118, orig_p=49997/tcp, resp_h=208.80.152.3, resp_p=80/tcp], UZkBBvjF0r8 +[orig_h=141.142.220.118, orig_p=49997/tcp, resp_h=208.80.152.3, resp_p=80/tcp], UZkBBvjF0r8 +[orig_h=141.142.220.118, orig_p=49996/tcp, resp_h=208.80.152.3, resp_p=80/tcp], svqqNKN9CFj +[orig_h=141.142.220.118, orig_p=49996/tcp, resp_h=208.80.152.3, resp_p=80/tcp], svqqNKN9CFj +[orig_h=141.142.220.118, orig_p=49998/tcp, resp_h=208.80.152.3, resp_p=80/tcp], OldlyspNIr7 +[orig_h=141.142.220.118, orig_p=49998/tcp, resp_h=208.80.152.3, resp_p=80/tcp], OldlyspNIr7 +[orig_h=141.142.220.118, orig_p=50000/tcp, resp_h=208.80.152.3, resp_p=80/tcp], j5w2LueK8Ti +[orig_h=141.142.220.118, orig_p=50000/tcp, resp_h=208.80.152.3, resp_p=80/tcp], j5w2LueK8Ti +[orig_h=141.142.220.118, orig_p=49999/tcp, resp_h=208.80.152.3, resp_p=80/tcp], OPM7xFSDNw3 +[orig_h=141.142.220.118, orig_p=49999/tcp, resp_h=208.80.152.3, resp_p=80/tcp], OPM7xFSDNw3 +[orig_h=141.142.220.118, orig_p=50001/tcp, resp_h=208.80.152.3, resp_p=80/tcp], hvOo97vj60k +[orig_h=141.142.220.118, orig_p=50001/tcp, resp_h=208.80.152.3, resp_p=80/tcp], hvOo97vj60k +[orig_h=141.142.220.118, orig_p=35642/tcp, resp_h=208.80.152.2, resp_p=80/tcp], OKiJdtzKWPk +[orig_h=141.142.220.118, orig_p=35642/tcp, resp_h=208.80.152.2, resp_p=80/tcp], OKiJdtzKWPk +[orig_h=141.142.220.235, orig_p=6705/tcp, resp_h=173.192.163.128, resp_p=80/tcp], tpUWfNdSLE +[orig_h=141.142.220.235, orig_p=6705/tcp, resp_h=173.192.163.128, resp_p=80/tcp], tpUWfNdSLE +[orig_h=141.142.220.44, orig_p=5353/udp, resp_h=224.0.0.251, resp_p=5353/udp], ra1C6ZLut4b +[orig_h=141.142.220.44, orig_p=5353/udp, resp_h=224.0.0.251, resp_p=5353/udp], ra1C6ZLut4b +[orig_h=141.142.220.226, orig_p=137/udp, resp_h=141.142.220.255, resp_p=137/udp], UElDH5b9qA5 +[orig_h=141.142.220.226, orig_p=137/udp, resp_h=141.142.220.255, resp_p=137/udp], UElDH5b9qA5 +[orig_h=141.142.220.226, orig_p=55131/udp, resp_h=224.0.0.252, resp_p=5355/udp], sO3mBXBav1h +[orig_h=141.142.220.226, orig_p=55131/udp, resp_h=224.0.0.252, resp_p=5355/udp], sO3mBXBav1h +[orig_h=141.142.220.226, orig_p=55671/udp, resp_h=224.0.0.252, resp_p=5355/udp], xAQqZE8Wdp4 +[orig_h=141.142.220.226, orig_p=55671/udp, resp_h=224.0.0.252, resp_p=5355/udp], xAQqZE8Wdp4 +[orig_h=141.142.220.238, orig_p=56641/udp, resp_h=141.142.220.255, resp_p=137/udp], zVecVnfOlsf +[orig_h=141.142.220.238, orig_p=56641/udp, resp_h=141.142.220.255, resp_p=137/udp], zVecVnfOlsf diff --git a/testing/btest/Baseline/logging.rotate-custom/out b/testing/btest/Baseline/logging.rotate-custom/out index f0d9185aa3..c87445cff5 100644 --- a/testing/btest/Baseline/logging.rotate-custom/out +++ b/testing/btest/Baseline/logging.rotate-custom/out @@ -28,107 +28,56 @@ 2nd test2-11-03-07_12.00.05.log test2.log 11-03-07_12.00.05 11-03-07_12.59.55 0 1st test-11-03-07_12.00.05.log test.log 11-03-07_12.00.05 11-03-07_12.59.55 1 2nd test2-11-03-07_12.59.55.log test2.log 11-03-07_12.59.55 11-03-07_12.59.55 1 +# t id.orig_h id.orig_p id.resp_h id.resp_p +1299466805.0 10.0.0.1 20 10.0.0.2 1024 +1299470395.0 10.0.0.2 20 10.0.0.3 0 +1299470405.0 10.0.0.1 20 10.0.0.2 1025 +1299473995.0 10.0.0.2 20 10.0.0.3 1 +1299474005.0 10.0.0.1 20 10.0.0.2 1026 +1299477595.0 10.0.0.2 20 10.0.0.3 2 +1299477605.0 10.0.0.1 20 10.0.0.2 1027 +1299481195.0 10.0.0.2 20 10.0.0.3 3 +1299481205.0 10.0.0.1 20 10.0.0.2 1028 +1299484795.0 10.0.0.2 20 10.0.0.3 4 +1299484805.0 10.0.0.1 20 10.0.0.2 1029 +1299488395.0 10.0.0.2 20 10.0.0.3 5 +1299488405.0 10.0.0.1 20 10.0.0.2 1030 +1299491995.0 10.0.0.2 20 10.0.0.3 6 +1299492005.0 10.0.0.1 20 10.0.0.2 1031 +1299495595.0 10.0.0.2 20 10.0.0.3 7 +1299495605.0 10.0.0.1 20 10.0.0.2 1032 +1299499195.0 10.0.0.2 20 10.0.0.3 8 +1299499205.0 10.0.0.1 20 10.0.0.2 1033 +1299502795.0 10.0.0.2 20 10.0.0.3 9 > test-11-03-07_03.00.05.log -# t id.orig_h id.orig_p id.resp_h id.resp_p -1299466805.0 10.0.0.1 20 10.0.0.2 1024 -1299470395.0 10.0.0.2 20 10.0.0.3 0 > test-11-03-07_04.00.05.log -# t id.orig_h id.orig_p id.resp_h id.resp_p -1299470405.0 10.0.0.1 20 10.0.0.2 1025 -1299473995.0 10.0.0.2 20 10.0.0.3 1 > test-11-03-07_05.00.05.log -# t id.orig_h id.orig_p id.resp_h id.resp_p -1299474005.0 10.0.0.1 20 10.0.0.2 1026 -1299477595.0 10.0.0.2 20 10.0.0.3 2 > test-11-03-07_06.00.05.log -# t id.orig_h id.orig_p id.resp_h id.resp_p -1299477605.0 10.0.0.1 20 10.0.0.2 1027 -1299481195.0 10.0.0.2 20 10.0.0.3 3 > test-11-03-07_07.00.05.log -# t id.orig_h id.orig_p id.resp_h id.resp_p -1299481205.0 10.0.0.1 20 10.0.0.2 1028 -1299484795.0 10.0.0.2 20 10.0.0.3 4 > test-11-03-07_08.00.05.log -# t id.orig_h id.orig_p id.resp_h id.resp_p -1299484805.0 10.0.0.1 20 10.0.0.2 1029 -1299488395.0 10.0.0.2 20 10.0.0.3 5 > test-11-03-07_09.00.05.log -# t id.orig_h id.orig_p id.resp_h id.resp_p -1299488405.0 10.0.0.1 20 10.0.0.2 1030 -1299491995.0 10.0.0.2 20 10.0.0.3 6 > test-11-03-07_10.00.05.log -# t id.orig_h id.orig_p id.resp_h id.resp_p -1299492005.0 10.0.0.1 20 10.0.0.2 1031 -1299495595.0 10.0.0.2 20 10.0.0.3 7 > test-11-03-07_11.00.05.log -# t id.orig_h id.orig_p id.resp_h id.resp_p -1299495605.0 10.0.0.1 20 10.0.0.2 1032 -1299499195.0 10.0.0.2 20 10.0.0.3 8 > test-11-03-07_12.00.05.log -# t id.orig_h id.orig_p id.resp_h id.resp_p -1299499205.0 10.0.0.1 20 10.0.0.2 1033 -1299502795.0 10.0.0.2 20 10.0.0.3 9 -> test2-11-03-07_03.00.05.log -# t id.orig_h id.orig_p id.resp_h id.resp_p -1299466805.0 10.0.0.1 20 10.0.0.2 1024 -> test2-11-03-07_03.59.55.log -# t id.orig_h id.orig_p id.resp_h id.resp_p -1299470395.0 10.0.0.2 20 10.0.0.3 0 -> test2-11-03-07_04.00.05.log -# t id.orig_h id.orig_p id.resp_h id.resp_p -1299470405.0 10.0.0.1 20 10.0.0.2 1025 -> test2-11-03-07_04.59.55.log -# t id.orig_h id.orig_p id.resp_h id.resp_p -1299473995.0 10.0.0.2 20 10.0.0.3 1 -> test2-11-03-07_05.00.05.log -# t id.orig_h id.orig_p id.resp_h id.resp_p -1299474005.0 10.0.0.1 20 10.0.0.2 1026 -> test2-11-03-07_05.59.55.log -# t id.orig_h id.orig_p id.resp_h id.resp_p -1299477595.0 10.0.0.2 20 10.0.0.3 2 -> test2-11-03-07_06.00.05.log -# t id.orig_h id.orig_p id.resp_h id.resp_p -1299477605.0 10.0.0.1 20 10.0.0.2 1027 -> test2-11-03-07_06.59.55.log -# t id.orig_h id.orig_p id.resp_h id.resp_p -1299481195.0 10.0.0.2 20 10.0.0.3 3 -> test2-11-03-07_07.00.05.log -# t id.orig_h id.orig_p id.resp_h id.resp_p -1299481205.0 10.0.0.1 20 10.0.0.2 1028 -> test2-11-03-07_07.59.55.log -# t id.orig_h id.orig_p id.resp_h id.resp_p -1299484795.0 10.0.0.2 20 10.0.0.3 4 -> test2-11-03-07_08.00.05.log -# t id.orig_h id.orig_p id.resp_h id.resp_p -1299484805.0 10.0.0.1 20 10.0.0.2 1029 -> test2-11-03-07_08.59.55.log -# t id.orig_h id.orig_p id.resp_h id.resp_p -1299488395.0 10.0.0.2 20 10.0.0.3 5 -> test2-11-03-07_09.00.05.log -# t id.orig_h id.orig_p id.resp_h id.resp_p -1299488405.0 10.0.0.1 20 10.0.0.2 1030 -> test2-11-03-07_09.59.55.log -# t id.orig_h id.orig_p id.resp_h id.resp_p -1299491995.0 10.0.0.2 20 10.0.0.3 6 -> test2-11-03-07_10.00.05.log -# t id.orig_h id.orig_p id.resp_h id.resp_p -1299492005.0 10.0.0.1 20 10.0.0.2 1031 -> test2-11-03-07_10.59.55.log -# t id.orig_h id.orig_p id.resp_h id.resp_p -1299495595.0 10.0.0.2 20 10.0.0.3 7 -> test2-11-03-07_11.00.05.log -# t id.orig_h id.orig_p id.resp_h id.resp_p -1299495605.0 10.0.0.1 20 10.0.0.2 1032 -> test2-11-03-07_11.59.55.log -# t id.orig_h id.orig_p id.resp_h id.resp_p -1299499195.0 10.0.0.2 20 10.0.0.3 8 -> test2-11-03-07_12.00.05.log -# t id.orig_h id.orig_p id.resp_h id.resp_p -1299499205.0 10.0.0.1 20 10.0.0.2 1033 -> test2-11-03-07_12.59.55.log -# t id.orig_h id.orig_p id.resp_h id.resp_p -1299502795.0 10.0.0.2 20 10.0.0.3 9 -> test2.log -# t id.orig_h id.orig_p id.resp_h id.resp_p > test.log -# t id.orig_h id.orig_p id.resp_h id.resp_p +> test2-11-03-07_03.00.05.log +> test2-11-03-07_03.59.55.log +> test2-11-03-07_04.00.05.log +> test2-11-03-07_04.59.55.log +> test2-11-03-07_05.00.05.log +> test2-11-03-07_05.59.55.log +> test2-11-03-07_06.00.05.log +> test2-11-03-07_06.59.55.log +> test2-11-03-07_07.00.05.log +> test2-11-03-07_07.59.55.log +> test2-11-03-07_08.00.05.log +> test2-11-03-07_08.59.55.log +> test2-11-03-07_09.00.05.log +> test2-11-03-07_09.59.55.log +> test2-11-03-07_10.00.05.log +> test2-11-03-07_10.59.55.log +> test2-11-03-07_11.00.05.log +> test2-11-03-07_11.59.55.log +> test2-11-03-07_12.00.05.log +> test2-11-03-07_12.59.55.log +> test2.log diff --git a/testing/btest/Makefile b/testing/btest/Makefile new file mode 100644 index 0000000000..ed042722b8 --- /dev/null +++ b/testing/btest/Makefile @@ -0,0 +1,14 @@ + +all: + # Showing all tests. + @btest + +brief: + # Brief output showing only failed tests. + @btest -b + +brief-debug: + # Verbose output for failed tests, also recorded in test.log. + @rm -f test.log + @btest -b -d -f test.log + @echo Output in test.log diff --git a/testing/btest/core/conn-id.bro b/testing/btest/core/conn-id.bro index 97bb064c31..04724bba3c 100644 --- a/testing/btest/core/conn-id.bro +++ b/testing/btest/core/conn-id.bro @@ -1,7 +1,7 @@ # # In "normal" test mode, connection uids should be determistic. # -# @TEST-EXEC: bro -C -r $TRACES/wikipedia.trace %INPUT tcp >output +# @TEST-EXEC: bro -C -r $TRACES/wikipedia.trace %INPUT conn >output # @TEST-EXEC: btest-diff output # # Without a seed, they should differ each time: diff --git a/testing/btest/logging/rotate-custom.bro b/testing/btest/logging/rotate-custom.bro index 66e90de8c3..59ad1330cd 100644 --- a/testing/btest/logging/rotate-custom.bro +++ b/testing/btest/logging/rotate-custom.bro @@ -1,6 +1,6 @@ # # @TEST-EXEC: bro -r %DIR/rotation.trace %INPUT >out -# @TEST-EXEC: for i in `ls test*.log | sort`; do printf '> %s\n' $i; cat $i; done >>out +# @TEST-EXEC: for i in `ls test*.log | sort`; do printf '> %s\n' $i; cat $i; done | sort | uniq >>out # @TEST-EXEC: btest-diff out module Test; From e6208c89503cfce9a2d8297ebef1e3858368050d Mon Sep 17 00:00:00 2001 From: Robin Sommer Date: Tue, 10 May 2011 17:56:53 -0700 Subject: [PATCH 04/16] Bringing connection state history back, which was accidentally deleted from conn.bro. However, this is primarily for the record, conn.bro will be replaced with a new version soon. --- policy/conn.bro | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/policy/conn.bro b/policy/conn.bro index 52993b0aec..1c9b434ff4 100644 --- a/policy/conn.bro +++ b/policy/conn.bro @@ -18,6 +18,10 @@ global have_SMTP = F; # if true, we've loaded smtp.bro # TODO: Do we have a nicer way of defining this prototype? export { global FTP::is_ftp_data_conn: function(c: connection): bool; } +# Whether to include connection state history in the logs generated +# by record_connection. +const record_state_history = F &redef; + # Whether to add 4 more columns to conn.log with # orig_packet orig_ip_bytes resp_packets resp_ip_bytes # Requires use_conn_size_analyzer=T @@ -311,6 +315,10 @@ function record_connection(f: file, c: connection) conn_size(c$orig, trans), conn_size(c$resp, trans), conn_state(c, trans), flags); + if ( record_state_history ) + log_msg = fmt("%s %s", log_msg, + c$history == "" ? "X" : c$history); + if ( use_conn_size_analyzer && report_conn_size_analyzer ) log_msg = fmt("%s %s %s", log_msg, conn_size_from_analyzer(c$orig), conn_size_from_analyzer(c$resp)); From ee872c12c8b1c4c0b2d4fbcc3a7c6ff256d29919 Mon Sep 17 00:00:00 2001 From: Robin Sommer Date: Tue, 10 May 2011 18:02:10 -0700 Subject: [PATCH 05/16] New bif bro_has_ipv6() to check whether IPv6 support is compiled in. --- aux/btest | 2 +- src/bro.bif | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/aux/btest b/aux/btest index d0154a7e88..e4abef963f 160000 --- a/aux/btest +++ b/aux/btest @@ -1 +1 @@ -Subproject commit d0154a7e88cd1b6bccc11c042e451fcb9b5459bf +Subproject commit e4abef963f1e85f1a0a8eb5d960d99e1766069b0 diff --git a/src/bro.bif b/src/bro.bif index 1d2c159f65..10abab68d6 100644 --- a/src/bro.bif +++ b/src/bro.bif @@ -3327,3 +3327,12 @@ function entropy_test_finish%(index: any%): entropy_test_result delete s; return ent_result; %} + +function bro_has_ipv6%(%) : bool + %{ +#ifdef BROv6 + return new Val(1, TYPE_BOOL); +#else + return new Val(0, TYPE_BOOL); +#endif + %} From 0815ea9188034bb5a5743f532143c72e1d6ad57f Mon Sep 17 00:00:00 2001 From: Robin Sommer Date: Tue, 10 May 2011 18:10:32 -0700 Subject: [PATCH 06/16] If IPv6 default is not compiled in, the default BPF filters now excludes IPv6 packets. --- policy/pcap.bro | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/policy/pcap.bro b/policy/pcap.bro index 42004e1c4c..021884a700 100644 --- a/policy/pcap.bro +++ b/policy/pcap.bro @@ -58,8 +58,13 @@ function build_default_pcap_filter(): string return cmd_line_bpf_filter; if ( all_packets ) + { # Return an "always true" filter. - return "ip or not ip"; + if ( bro_has_ipv6() ) + return "ip or not ip"; + else + return "not ip6"; + } ## Build filter dynamically. @@ -76,6 +81,10 @@ function build_default_pcap_filter(): string # Finally, join them. local filter = join_filters(cfilter, rfilter); + # Exclude IPv6 if we don't support it. + if ( ! bro_has_ipv6() ) + filter = fmt("(not ip6) and (%s)", filter); + return filter; } From 63f7359e1e77f983cb6563eeb542983334c58f77 Mon Sep 17 00:00:00 2001 From: Robin Sommer Date: Tue, 10 May 2011 18:19:27 -0700 Subject: [PATCH 07/16] Bugfix: vectors in records were not initalized. Closes #421. --- src/Val.cc | 2 +- .../btest/Baseline/language.rec-comp-init/output | 5 +++++ testing/btest/language/rec-comp-init.bro | 14 ++++++++++++++ 3 files changed, 20 insertions(+), 1 deletion(-) create mode 100644 testing/btest/Baseline/language.rec-comp-init/output create mode 100644 testing/btest/language/rec-comp-init.bro diff --git a/src/Val.cc b/src/Val.cc index cf9ee031fd..e0ba8df9bf 100644 --- a/src/Val.cc +++ b/src/Val.cc @@ -2866,7 +2866,7 @@ RecordVal::RecordVal(RecordType* t) : MutableVal(t) else if ( tag == TYPE_TABLE ) def = new TableVal(type->AsTableType(), a); - else if ( t->Tag() == TYPE_VECTOR ) + else if ( tag == TYPE_VECTOR ) def = new VectorVal(type->AsVectorType()); } diff --git a/testing/btest/Baseline/language.rec-comp-init/output b/testing/btest/Baseline/language.rec-comp-init/output new file mode 100644 index 0000000000..fedb9177c7 --- /dev/null +++ b/testing/btest/Baseline/language.rec-comp-init/output @@ -0,0 +1,5 @@ +[a={ + +}, b={ + +}, c=[]] diff --git a/testing/btest/language/rec-comp-init.bro b/testing/btest/language/rec-comp-init.bro new file mode 100644 index 0000000000..598c0cf3bd --- /dev/null +++ b/testing/btest/language/rec-comp-init.bro @@ -0,0 +1,14 @@ +# @TEST-EXEC: bro %INPUT >output 2>&1 +# @TEST-EXEC: btest-diff output + +# Make sure composit types in records are initialized. + +type Foo: record { + a: set[count]; + b: table[count] of string; + c: vector of string; +}; + +global f: Foo; + +print f; From 69391afc42bd85410edfed5dd11c00ce3951e91a Mon Sep 17 00:00:00 2001 From: Robin Sommer Date: Tue, 10 May 2011 18:29:05 -0700 Subject: [PATCH 08/16] A hack to report missing GeoIP support only once. This closes #357, but #455 captures the need for a more general solution. --- src/bro.bif | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/src/bro.bif b/src/bro.bif index 10abab68d6..014120828e 100644 --- a/src/bro.bif +++ b/src/bro.bif @@ -3106,7 +3106,13 @@ function lookup_location%(a: addr%) : geo_location } #else - builtin_run_time("Bro was not configured for GeoIP support"); + static int missing_geoip_reported = 0; + + if ( ! missing_geoip_reported ) + { + builtin_run_time("Bro was not configured for GeoIP support"); + missing_geoip_reported = 1; + } #endif // We can get here even if we have GeoIP support if we weren't @@ -3164,7 +3170,13 @@ function lookup_asn%(a: addr%) : count return new Val(atoi(gir+2), TYPE_COUNT); } #else - builtin_run_time("Bro was not configured for GeoIP ASN support"); + static int missing_geoip_reported = 0; + + if ( ! missing_geoip_reported ) + { + builtin_run_time("Bro was not configured for GeoIP ASN support"); + missing_geoip_reported = 1; + } #endif // We can get here even if we have GeoIP support, if we weren't From 42a1efa77f5701524d22a1e9f8fe7ea6ba1f26af Mon Sep 17 00:00:00 2001 From: Robin Sommer Date: Tue, 10 May 2011 18:30:05 -0700 Subject: [PATCH 09/16] Updating submodule(s). --- aux/broccoli | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aux/broccoli b/aux/broccoli index 7c20b1a410..54f3ff4e66 160000 --- a/aux/broccoli +++ b/aux/broccoli @@ -1 +1 @@ -Subproject commit 7c20b1a41016471eb03ee7a0fbfe1fb34bdc084a +Subproject commit 54f3ff4e6627d4a44d1e014e8e581e4e9dfed8c3 From 1b76b76bb0375a86154d2eebc8a5e413f2ce969a Mon Sep 17 00:00:00 2001 From: Robin Sommer Date: Tue, 10 May 2011 18:58:19 -0700 Subject: [PATCH 10/16] Removing old istate test-suite. --- testing/istate/README | 11 - testing/istate/base/bro-ping/remote.log | 17 - testing/istate/base/bro-ping/stderr.log | 3 - testing/istate/base/bro-ping/stdout.log | 0 testing/istate/base/broccoli-ping/stderr.log | 0 testing/istate/base/broccoli-ping/stdout.log | 5 - testing/istate/base/events-display/stdout.log | 36 --- testing/istate/base/events-rcv/conn.log | 2 - testing/istate/base/events-rcv/http.log | 18 -- testing/istate/base/events-rcv/stderr.log | 3 - testing/istate/base/events-rcv/stdout.log | 0 testing/istate/base/events-send/conn.log | 3 - testing/istate/base/events-send/http.log | 18 -- testing/istate/base/events-send/stderr.log | 0 testing/istate/base/events-send/stdout.log | 0 .../istate/base/persistence-read/stderr.log | 0 .../istate/base/persistence-read/stdout.log | 0 testing/istate/base/persistence-read/vars.log | 33 -- .../istate/base/persistence-write/stderr.log | 0 .../istate/base/persistence-write/stdout.log | 0 .../istate/base/persistence-write/vars.log | 33 -- testing/istate/base/python-bro/stdout.log | 14 - testing/istate/base/python-script/stdout.log | 44 --- testing/istate/base/sync-rcv/remote.log | 21 -- testing/istate/base/sync-rcv/stderr.log | 1 - testing/istate/base/sync-rcv/stdout.log | 0 testing/istate/base/sync-rcv/vars.log | 34 -- testing/istate/base/sync-send/stderr.log | 2 - testing/istate/base/sync-send/stdout.log | 0 testing/istate/base/sync-send/vars.log | 34 -- testing/istate/istate.py | 174 ---------- testing/istate/rndseed.dat | 17 - testing/istate/scripts/events-rcv.bro | 18 -- testing/istate/scripts/events-send.bro | 21 -- testing/istate/scripts/vars-declare.bro | 36 --- testing/istate/scripts/vars-init.bro | 42 --- testing/istate/scripts/vars-modify.bro | 61 ---- testing/istate/scripts/vars-print.bro | 29 -- testing/istate/scripts/vars-sync-rcv.bro | 13 - testing/istate/scripts/vars-sync-send.bro | 20 -- testing/istate/tests.py | 300 ------------------ testing/istate/traces/empty.trace | Bin 24 -> 0 bytes testing/istate/traces/web.trace | Bin 11525 -> 0 bytes 43 files changed, 1063 deletions(-) delete mode 100644 testing/istate/README delete mode 100644 testing/istate/base/bro-ping/remote.log delete mode 100644 testing/istate/base/bro-ping/stderr.log delete mode 100644 testing/istate/base/bro-ping/stdout.log delete mode 100644 testing/istate/base/broccoli-ping/stderr.log delete mode 100644 testing/istate/base/broccoli-ping/stdout.log delete mode 100644 testing/istate/base/events-display/stdout.log delete mode 100644 testing/istate/base/events-rcv/conn.log delete mode 100644 testing/istate/base/events-rcv/http.log delete mode 100644 testing/istate/base/events-rcv/stderr.log delete mode 100644 testing/istate/base/events-rcv/stdout.log delete mode 100644 testing/istate/base/events-send/conn.log delete mode 100644 testing/istate/base/events-send/http.log delete mode 100644 testing/istate/base/events-send/stderr.log delete mode 100644 testing/istate/base/events-send/stdout.log delete mode 100644 testing/istate/base/persistence-read/stderr.log delete mode 100644 testing/istate/base/persistence-read/stdout.log delete mode 100644 testing/istate/base/persistence-read/vars.log delete mode 100644 testing/istate/base/persistence-write/stderr.log delete mode 100644 testing/istate/base/persistence-write/stdout.log delete mode 100644 testing/istate/base/persistence-write/vars.log delete mode 100644 testing/istate/base/python-bro/stdout.log delete mode 100644 testing/istate/base/python-script/stdout.log delete mode 100644 testing/istate/base/sync-rcv/remote.log delete mode 100644 testing/istate/base/sync-rcv/stderr.log delete mode 100644 testing/istate/base/sync-rcv/stdout.log delete mode 100644 testing/istate/base/sync-rcv/vars.log delete mode 100644 testing/istate/base/sync-send/stderr.log delete mode 100644 testing/istate/base/sync-send/stdout.log delete mode 100644 testing/istate/base/sync-send/vars.log delete mode 100755 testing/istate/istate.py delete mode 100644 testing/istate/rndseed.dat delete mode 100644 testing/istate/scripts/events-rcv.bro delete mode 100644 testing/istate/scripts/events-send.bro delete mode 100644 testing/istate/scripts/vars-declare.bro delete mode 100644 testing/istate/scripts/vars-init.bro delete mode 100644 testing/istate/scripts/vars-modify.bro delete mode 100644 testing/istate/scripts/vars-print.bro delete mode 100644 testing/istate/scripts/vars-sync-rcv.bro delete mode 100644 testing/istate/scripts/vars-sync-send.bro delete mode 100644 testing/istate/tests.py delete mode 100644 testing/istate/traces/empty.trace delete mode 100644 testing/istate/traces/web.trace diff --git a/testing/istate/README b/testing/istate/README deleted file mode 100644 index 78e855074f..0000000000 --- a/testing/istate/README +++ /dev/null @@ -1,11 +0,0 @@ -To run these tests, invoke: - - ./istate.py - -To see differences leading to test failures, invoke: - - ./istate.py -s - -Build a new test baseline using: - - ./istate.py -b diff --git a/testing/istate/base/bro-ping/remote.log b/testing/istate/base/bro-ping/remote.log deleted file mode 100644 index 4f86bd62d6..0000000000 --- a/testing/istate/base/bro-ping/remote.log +++ /dev/null @@ -1,17 +0,0 @@ -xxxxxxxxxx.xxxxxx [info] [parent] pipe's socket buffer size is 8192, setting to 1048576 -xxxxxxxxxx.xxxxxx [info] [parent] communication started, parent -xxxxxxxxxx.xxxxxx [info] [child] listening on 0.0.0.0:47758 (clear) -xxxxxxxxxx.xxxxxx [info] [child] [#10000/] accepted clear connection -xxxxxxxxxx.xxxxxx [info] [parent] [#10000/] added peer -xxxxxxxxxx.xxxxxx [info] [parent] [#10000/] peer connected -xxxxxxxxxx.xxxxxx [info] [parent] [#10000/] phase: version -xxxxxxxxxx.xxxxxx [info] [script] [#10000/] connection established -xxxxxxxxxx.xxxxxx [info] [script] [#10000/] requesting events matching /^?(ping)$?/ -xxxxxxxxxx.xxxxxx [info] [script] [#10000/] accepting state -xxxxxxxxxx.xxxxxx [info] [script] [#10000/] requesting synchronized state -xxxxxxxxxx.xxxxxx [info] [parent] [#10000/] phase: handshake -xxxxxxxxxx.xxxxxx [info] [parent] [#10000/] registered for event pong -xxxxxxxxxx.xxxxxx [info] [parent] [#10000/] peer does not support 64bit PIDs; using compatibility mode -xxxxxxxxxx.xxxxxx [info] [parent] [#10000/] phase: sync (receiver) -xxxxxxxxxx.xxxxxx [info] [parent] [#10000/] phase: running -xxxxxxxxxx.xxxxxx [info] [parent] [#10000/] closing connection diff --git a/testing/istate/base/bro-ping/stderr.log b/testing/istate/base/bro-ping/stderr.log deleted file mode 100644 index bb611b7eb0..0000000000 --- a/testing/istate/base/bro-ping/stderr.log +++ /dev/null @@ -1,3 +0,0 @@ -xxxxxxxxxx.xxxxxx processing suspended -xxxxxxxxxx.xxxxxx processing continued -xxxxxxxxxx.xxxxxx received termination signal diff --git a/testing/istate/base/bro-ping/stdout.log b/testing/istate/base/bro-ping/stdout.log deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/testing/istate/base/broccoli-ping/stderr.log b/testing/istate/base/broccoli-ping/stderr.log deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/testing/istate/base/broccoli-ping/stdout.log b/testing/istate/base/broccoli-ping/stdout.log deleted file mode 100644 index 6174e6cce8..0000000000 --- a/testing/istate/base/broccoli-ping/stdout.log +++ /dev/null @@ -1,5 +0,0 @@ -pong event from 127.0.0.1: seq=0, -pong event from 127.0.0.1: seq=1, -pong event from 127.0.0.1: seq=2, -pong event from 127.0.0.1: seq=3, -pong event from 127.0.0.1: seq=4, diff --git a/testing/istate/base/events-display/stdout.log b/testing/istate/base/events-display/stdout.log deleted file mode 100644 index a68f969a3c..0000000000 --- a/testing/istate/base/events-display/stdout.log +++ /dev/null @@ -1,36 +0,0 @@ -Event [xxxxxxxxxx.xxxxxx] bro_done() -Event [xxxxxxxxxx.xxxxxx] connection_established([id=[orig_h=141.42.64.125, orig_p=56730/tcp, resp_h=125.190.109.199, resp_p=80/tcp], orig=[size=0, state=4], resp=[size=0, state=4], start_time=xxxxxxxxxx.xxxxxx, duration=0.182510137557983, service={}, addl="", hot=0, history="Sh"]) -Event [xxxxxxxxxx.xxxxxx] connection_finished([id=[orig_h=141.42.64.125, orig_p=56730/tcp, resp_h=125.190.109.199, resp_p=80/tcp], orig=[size=98, state=5], resp=[size=9417, state=5], start_time=xxxxxxxxxx.xxxxxx, duration=1.73330307006836, service={}, addl="%events-send-1", hot=0, history="ShADdFaf"]) -Event [xxxxxxxxxx.xxxxxx] connection_pending([id=[orig_h=141.42.64.125, orig_p=56729/tcp, resp_h=125.190.109.199, resp_p=12345/tcp], orig=[size=0, state=1], resp=[size=0, state=6], start_time=xxxxxxxxxx.xxxxxx, duration=0.182432889938354, service={}, addl="", hot=0, history="Sr"]) -Event [xxxxxxxxxx.xxxxxx] connection_state_remove([id=[orig_h=141.42.64.125, orig_p=56729/tcp, resp_h=125.190.109.199, resp_p=12345/tcp], orig=[size=0, state=1], resp=[size=0, state=6], start_time=xxxxxxxxxx.xxxxxx, duration=0.182432889938354, service={}, addl="", hot=0, history="Sr"]) -Event [xxxxxxxxxx.xxxxxx] connection_state_remove([id=[orig_h=141.42.64.125, orig_p=56730/tcp, resp_h=125.190.109.199, resp_p=80/tcp], orig=[size=98, state=5], resp=[size=9417, state=5], start_time=xxxxxxxxxx.xxxxxx, duration=1.73330307006836, service={}, addl="%events-send-1", hot=0, history="ShADdFaf"]) -Event [xxxxxxxxxx.xxxxxx] http_begin_entity([id=[orig_h=141.42.64.125, orig_p=56730/tcp, resp_h=125.190.109.199, resp_p=80/tcp], orig=[size=98, state=4], resp=[size=0, state=4], start_time=xxxxxxxxxx.xxxxxx, duration=0.183290958404541, service={}, addl="%events-send-1", hot=0, history="ShAD"]T) -Event [xxxxxxxxxx.xxxxxx] http_begin_entity([id=[orig_h=141.42.64.125, orig_p=56730/tcp, resp_h=125.190.109.199, resp_p=80/tcp], orig=[size=98, state=4], resp=[size=1448, state=4], start_time=xxxxxxxxxx.xxxxxx, duration=0.367331027984619, service={}, addl="%events-send-1 %events-rcv-1", hot=0, history="ShADd"]F) -Event [xxxxxxxxxx.xxxxxx] http_content_type([id=[orig_h=141.42.64.125, orig_p=56730/tcp, resp_h=125.190.109.199, resp_p=80/tcp], orig=[size=98, state=4], resp=[size=0, state=4], start_time=xxxxxxxxxx.xxxxxx, duration=0.183290958404541, service={}, addl="%events-send-1 %events-rcv-1", hot=0, history="ShAD"]T"TEXT""PLAIN") -Event [xxxxxxxxxx.xxxxxx] http_content_type([id=[orig_h=141.42.64.125, orig_p=56730/tcp, resp_h=125.190.109.199, resp_p=80/tcp], orig=[size=98, state=4], resp=[size=1448, state=4], start_time=xxxxxxxxxx.xxxxxx, duration=0.367331027984619, service={}, addl="%events-send-1 %events-rcv-1", hot=0, history="ShADd"]F"TEXT""HTML") -Event [xxxxxxxxxx.xxxxxx] http_end_entity([id=[orig_h=141.42.64.125, orig_p=56730/tcp, resp_h=125.190.109.199, resp_p=80/tcp], orig=[size=98, state=4], resp=[size=0, state=4], start_time=xxxxxxxxxx.xxxxxx, duration=0.183290958404541, service={}, addl="%events-send-1 %events-rcv-1", hot=0, history="ShAD"]T) -Event [xxxxxxxxxx.xxxxxx] http_end_entity([id=[orig_h=141.42.64.125, orig_p=56730/tcp, resp_h=125.190.109.199, resp_p=80/tcp], orig=[size=98, state=4], resp=[size=9417, state=4], start_time=xxxxxxxxxx.xxxxxx, duration=0.73563814163208, service={}, addl="%events-send-1 %events-rcv-1", hot=0, history="ShADd"]F) -Event [xxxxxxxxxx.xxxxxx] http_entity_data([id=[orig_h=141.42.64.125, orig_p=56730/tcp, resp_h=125.190.109.199, resp_p=80/tcp], orig=[size=98, state=4], resp=[size=5792, state=4], start_time=xxxxxxxxxx.xxxxxx, duration=0.551820039749146, service={}, addl="%events-send-1", hot=0, history="ShADd"]F4096"^JICIR^J^JICIR
^J

^JICIR (The ICSI Center for Internet Research)^Jis a ^Jnon-profit^Jresearch institute at^JICSI^Jin ^JBerkeley, ^JCalifornia.
^JFor the three years from 1999 to 2001 we were named^JACIRI, the AT&T Center for Internet Research at ICSI, ^Jand were funded by AT&T.
^J^JThe goals of ICIR are to:^J

    ^J
  • Pursue research on the Internet architecture and related networking issues,^J
  • ^JParticipate actively in the research (SIGCOMM and IRTF) and^Jstandards (IETF) communities,^J
  • Bridge the gap between the Internet research community and commercial ^Jinterests by providing a neutral forum where topics of mutual technical ^Jinterest can be addressed.^J
^J

^J^J


^J^J
^J^J^J^J^J^J^J^J^J^J^J
^J^J

^JPeople^J

^J^J^J
^J^J

^JPublications^J

^J^J^J

^JProjects ^J

^J^J^J^J
^J ^J

Research

^J   Transport and Congestion^J
    ^J
  • ^JDCCP^J(Datagram Congestion Control Protocol).^J
  • ^JECN^J(Explicit Congestion Notification).^J
  • ^J^JIntegrated services.^J
  • ^JRED ^Jqueue management, and^JRED-PD.^J
  • ^JHighSpeed TCP.^J
  • ^J^JTCP Implementation.^J
  • ^JReordering-Robust TCP ^J(RR-TCP).^J
  • TCP^JSACK ^J(Selective Acknowledgment).^J
  • ^JTFRC ^J(TCP-Friendly Rate Control).^J
^J^J   Traffic and Topology^J
    ^J
  • ^JIDMaps ^J(Internet Distance Mapping).^J
  • The ^JInternet Traffic Archive.^J
  • ^JMINC^J(Multicast-based Inference of Network-internal Characteristics).^J
  • ^JNIMI^J(N") -Event [xxxxxxxxxx.xxxxxx] http_entity_data([id=[orig_h=141.42.64.125, orig_p=56730/tcp, resp_h=125.190.109.199, resp_p=80/tcp], orig=[size=98, state=4], resp=[size=9417, state=4], start_time=xxxxxxxxxx.xxxxxx, duration=0.73563814163208, service={}, addl="%events-send-1", hot=0, history="ShADd"]F938"ational Internet Measurement Infrastructure).^J
^J^J

^J^JCollaborators^J

^J^J^J^J
^J
^J^J
^J

Information for visitors and local users.

^J
^JLast modified: June 2004. Copyright notice.^J^JOlder versions of this web page, in its ACIRI incarnation..^J
^JFor more information about this server, mail www@aciri.org. ^J
^JTo report unusual activity by any of our hosts, mail abuse@aciri.org.^J^J") -Event [xxxxxxxxxx.xxxxxx] http_header([id=[orig_h=141.42.64.125, orig_p=56730/tcp, resp_h=125.190.109.199, resp_p=80/tcp], orig=[size=98, state=4], resp=[size=0, state=4], start_time=xxxxxxxxxx.xxxxxx, duration=0.183290958404541, service={}, addl="%events-send-1 %events-rcv-1", hot=0, history="ShAD"]T"ACCEPT""*/*") -Event [xxxxxxxxxx.xxxxxx] http_header([id=[orig_h=141.42.64.125, orig_p=56730/tcp, resp_h=125.190.109.199, resp_p=80/tcp], orig=[size=98, state=4], resp=[size=0, state=4], start_time=xxxxxxxxxx.xxxxxx, duration=0.183290958404541, service={}, addl="%events-send-1 %events-rcv-1", hot=0, history="ShAD"]T"CONNECTION""Keep-Alive") -Event [xxxxxxxxxx.xxxxxx] http_header([id=[orig_h=141.42.64.125, orig_p=56730/tcp, resp_h=125.190.109.199, resp_p=80/tcp], orig=[size=98, state=4], resp=[size=0, state=4], start_time=xxxxxxxxxx.xxxxxx, duration=0.183290958404541, service={}, addl="%events-send-1 %events-rcv-1", hot=0, history="ShAD"]T"HOST""www.icir.org") -Event [xxxxxxxxxx.xxxxxx] http_header([id=[orig_h=141.42.64.125, orig_p=56730/tcp, resp_h=125.190.109.199, resp_p=80/tcp], orig=[size=98, state=4], resp=[size=0, state=4], start_time=xxxxxxxxxx.xxxxxx, duration=0.183290958404541, service={}, addl="%events-send-1 %events-rcv-1", hot=0, history="ShAD"]T"USER-AGENT""Wget/1.10") -Event [xxxxxxxxxx.xxxxxx] http_header([id=[orig_h=141.42.64.125, orig_p=56730/tcp, resp_h=125.190.109.199, resp_p=80/tcp], orig=[size=98, state=4], resp=[size=1448, state=4], start_time=xxxxxxxxxx.xxxxxx, duration=0.367331027984619, service={}, addl="%events-send-1 %events-rcv-1", hot=0, history="ShADd"]F"ACCEPT-RANGES""bytes") -Event [xxxxxxxxxx.xxxxxx] http_header([id=[orig_h=141.42.64.125, orig_p=56730/tcp, resp_h=125.190.109.199, resp_p=80/tcp], orig=[size=98, state=4], resp=[size=1448, state=4], start_time=xxxxxxxxxx.xxxxxx, duration=0.367331027984619, service={}, addl="%events-send-1 %events-rcv-1", hot=0, history="ShADd"]F"CONNECTION""Keep-Alive") -Event [xxxxxxxxxx.xxxxxx] http_header([id=[orig_h=141.42.64.125, orig_p=56730/tcp, resp_h=125.190.109.199, resp_p=80/tcp], orig=[size=98, state=4], resp=[size=1448, state=4], start_time=xxxxxxxxxx.xxxxxx, duration=0.367331027984619, service={}, addl="%events-send-1 %events-rcv-1", hot=0, history="ShADd"]F"CONTENT-LENGTH""9130") -Event [xxxxxxxxxx.xxxxxx] http_header([id=[orig_h=141.42.64.125, orig_p=56730/tcp, resp_h=125.190.109.199, resp_p=80/tcp], orig=[size=98, state=4], resp=[size=1448, state=4], start_time=xxxxxxxxxx.xxxxxx, duration=0.367331027984619, service={}, addl="%events-send-1 %events-rcv-1", hot=0, history="ShADd"]F"CONTENT-TYPE""text/html") -Event [xxxxxxxxxx.xxxxxx] http_header([id=[orig_h=141.42.64.125, orig_p=56730/tcp, resp_h=125.190.109.199, resp_p=80/tcp], orig=[size=98, state=4], resp=[size=1448, state=4], start_time=xxxxxxxxxx.xxxxxx, duration=0.367331027984619, service={}, addl="%events-send-1 %events-rcv-1", hot=0, history="ShADd"]F"DATE""Fri, 07 Oct 2005 23:23:55 GMT") -Event [xxxxxxxxxx.xxxxxx] http_header([id=[orig_h=141.42.64.125, orig_p=56730/tcp, resp_h=125.190.109.199, resp_p=80/tcp], orig=[size=98, state=4], resp=[size=1448, state=4], start_time=xxxxxxxxxx.xxxxxx, duration=0.367331027984619, service={}, addl="%events-send-1 %events-rcv-1", hot=0, history="ShADd"]F"ETAG"""2c96c-23aa-4346a0e5"") -Event [xxxxxxxxxx.xxxxxx] http_header([id=[orig_h=141.42.64.125, orig_p=56730/tcp, resp_h=125.190.109.199, resp_p=80/tcp], orig=[size=98, state=4], resp=[size=1448, state=4], start_time=xxxxxxxxxx.xxxxxx, duration=0.367331027984619, service={}, addl="%events-send-1 %events-rcv-1", hot=0, history="ShADd"]F"KEEP-ALIVE""timeout=15, max=100") -Event [xxxxxxxxxx.xxxxxx] http_header([id=[orig_h=141.42.64.125, orig_p=56730/tcp, resp_h=125.190.109.199, resp_p=80/tcp], orig=[size=98, state=4], resp=[size=1448, state=4], start_time=xxxxxxxxxx.xxxxxx, duration=0.367331027984619, service={}, addl="%events-send-1 %events-rcv-1", hot=0, history="ShADd"]F"LAST-MODIFIED""Fri, 07 Oct 2005 16:23:01 GMT") -Event [xxxxxxxxxx.xxxxxx] http_header([id=[orig_h=141.42.64.125, orig_p=56730/tcp, resp_h=125.190.109.199, resp_p=80/tcp], orig=[size=98, state=4], resp=[size=1448, state=4], start_time=xxxxxxxxxx.xxxxxx, duration=0.367331027984619, service={}, addl="%events-send-1 %events-rcv-1", hot=0, history="ShADd"]F"SERVER""Apache/1.3.33 (Unix)") -Event [xxxxxxxxxx.xxxxxx] http_message_done([id=[orig_h=141.42.64.125, orig_p=56730/tcp, resp_h=125.190.109.199, resp_p=80/tcp], orig=[size=98, state=4], resp=[size=0, state=4], start_time=xxxxxxxxxx.xxxxxx, duration=0.183290958404541, service={}, addl="%events-send-1 %events-rcv-1", hot=0, history="ShAD"]T[start=xxxxxxxxxx.xxxxxx, interrupted=F, finish_msg="message ends normally", body_length=0, content_gap_length=0, header_length=86]) -Event [xxxxxxxxxx.xxxxxx] http_message_done([id=[orig_h=141.42.64.125, orig_p=56730/tcp, resp_h=125.190.109.199, resp_p=80/tcp], orig=[size=98, state=4], resp=[size=9417, state=4], start_time=xxxxxxxxxx.xxxxxx, duration=0.73563814163208, service={}, addl="%events-send-1 %events-rcv-1", hot=0, history="ShADd"]F[start=xxxxxxxxxx.xxxxxx, interrupted=F, finish_msg="message ends normally", body_length=9130, content_gap_length=0, header_length=265]) -Event [xxxxxxxxxx.xxxxxx] http_reply([id=[orig_h=141.42.64.125, orig_p=56730/tcp, resp_h=125.190.109.199, resp_p=80/tcp], orig=[size=98, state=4], resp=[size=1448, state=4], start_time=xxxxxxxxxx.xxxxxx, duration=0.367331027984619, service={}, addl="%events-send-1", hot=0, history="ShADd"]"1.1"200"OK") -Event [xxxxxxxxxx.xxxxxx] http_request([id=[orig_h=141.42.64.125, orig_p=56730/tcp, resp_h=125.190.109.199, resp_p=80/tcp], orig=[size=98, state=4], resp=[size=0, state=4], start_time=xxxxxxxxxx.xxxxxx, duration=0.183290958404541, service={}, addl="", hot=0, history="ShAD"]"GET""/""/""1.0") -Event [xxxxxxxxxx.xxxxxx] net_done(xxxxxxxxxx.xxxxxx) -Event [xxxxxxxxxx.xxxxxx] new_connection([id=[orig_h=141.42.64.125, orig_p=56730/tcp, resp_h=125.190.109.199, resp_p=80/tcp], orig=[size=0, state=0], resp=[size=0, state=0], start_time=xxxxxxxxxx.xxxxxx, duration=0.0, service={}, addl="", hot=0, history=""]) -Event [xxxxxxxxxx.xxxxxx] new_connection([id=[orig_h=141.42.64.125, orig_p=56730/tcp, resp_h=125.190.109.199, resp_p=80/tcp], orig=[size=0, state=1], resp=[size=0, state=0], start_time=xxxxxxxxxx.xxxxxx, duration=0.0, service={}, addl="cc=1", hot=0, history=""]) -Event [xxxxxxxxxx.xxxxxx] protocol_confirmation([id=[orig_h=141.42.64.125, orig_p=56730/tcp, resp_h=125.190.109.199, resp_p=80/tcp], orig=[size=98, state=4], resp=[size=0, state=4], start_time=xxxxxxxxxx.xxxxxx, duration=0.183290958404541, service={}, addl="", hot=0, history="ShAD"]165) diff --git a/testing/istate/base/events-rcv/conn.log b/testing/istate/base/events-rcv/conn.log deleted file mode 100644 index b38c0a2e70..0000000000 --- a/testing/istate/base/events-rcv/conn.log +++ /dev/null @@ -1,2 +0,0 @@ -xxxxxxxxxx.xxxxxx 0.182433 141.42.64.125 125.190.109.199 other 56729 12345 tcp ? ? REJ X -xxxxxxxxxx.xxxxxx 1.733303 141.42.64.125 125.190.109.199 http 56730 80 tcp 98 9417 SF X %events-send-1 diff --git a/testing/istate/base/events-rcv/http.log b/testing/istate/base/events-rcv/http.log deleted file mode 100644 index db049772d8..0000000000 --- a/testing/istate/base/events-rcv/http.log +++ /dev/null @@ -1,18 +0,0 @@ -xxxxxxxxxx.xxxxxx %events-rcv-1 start 141.42.64.125:56730 > 125.190.109.199:80 -xxxxxxxxxx.xxxxxx %events-rcv-1 > USER-AGENT: Wget/1.10 -xxxxxxxxxx.xxxxxx %events-rcv-1 > ACCEPT: */* -xxxxxxxxxx.xxxxxx %events-rcv-1 > HOST: www.icir.org -xxxxxxxxxx.xxxxxx %events-rcv-1 > CONNECTION: Keep-Alive -xxxxxxxxxx.xxxxxx %events-rcv-1 < DATE: Fri, 07 Oct 2005 23:23:55 GMT -xxxxxxxxxx.xxxxxx %events-rcv-1 < SERVER: Apache/1.3.33 (Unix) -xxxxxxxxxx.xxxxxx %events-rcv-1 < LAST-MODIFIED: Fri, 07 Oct 2005 16:23:01 GMT -xxxxxxxxxx.xxxxxx %events-rcv-1 < ETAG: "2c96c-23aa-4346a0e5" -xxxxxxxxxx.xxxxxx %events-rcv-1 < ACCEPT-RANGES: bytes -xxxxxxxxxx.xxxxxx %events-rcv-1 < CONTENT-LENGTH: 9130 -xxxxxxxxxx.xxxxxx %events-rcv-1 < KEEP-ALIVE: timeout=15, max=100 -xxxxxxxxxx.xxxxxx %events-rcv-1 < CONNECTION: Keep-Alive -xxxxxxxxxx.xxxxxx %events-rcv-1 < CONTENT-TYPE: text/html -xxxxxxxxxx.xxxxxx %events-rcv-1 <= 4096 bytes: "^J^J

^JPublications^J

^J
    ^J 125.190.109.199:80 -xxxxxxxxxx.xxxxxx %events-send-1 > USER-AGENT: Wget/1.10 -xxxxxxxxxx.xxxxxx %events-send-1 > ACCEPT: */* -xxxxxxxxxx.xxxxxx %events-send-1 > HOST: www.icir.org -xxxxxxxxxx.xxxxxx %events-send-1 > CONNECTION: Keep-Alive -xxxxxxxxxx.xxxxxx %events-send-1 < DATE: Fri, 07 Oct 2005 23:23:55 GMT -xxxxxxxxxx.xxxxxx %events-send-1 < SERVER: Apache/1.3.33 (Unix) -xxxxxxxxxx.xxxxxx %events-send-1 < LAST-MODIFIED: Fri, 07 Oct 2005 16:23:01 GMT -xxxxxxxxxx.xxxxxx %events-send-1 < ETAG: "2c96c-23aa-4346a0e5" -xxxxxxxxxx.xxxxxx %events-send-1 < ACCEPT-RANGES: bytes -xxxxxxxxxx.xxxxxx %events-send-1 < CONTENT-LENGTH: 9130 -xxxxxxxxxx.xxxxxx %events-send-1 < KEEP-ALIVE: timeout=15, max=100 -xxxxxxxxxx.xxxxxx %events-send-1 < CONNECTION: Keep-Alive -xxxxxxxxxx.xxxxxx %events-send-1 < CONTENT-TYPE: text/html -xxxxxxxxxx.xxxxxx %events-send-1 <= 4096 bytes: "^J^J

    ^JPublications^J

    ^J
      ^J 2 - xxxxxxxxxx.xxxxxx - 120.0 -False False -1.5 1.5 -'Servus' Servus - 5555/tcp - 6.7.6.5 - X.X.X - 192.168.0.0/16 -==== record 1 ==== - -42 42 -'6.6.7.7' 6.6.7.7 -==== record 2 ==== - -99 99 -'3.4.5.1' 3.4.5.1 diff --git a/testing/istate/base/sync-rcv/remote.log b/testing/istate/base/sync-rcv/remote.log deleted file mode 100644 index 01c0aa34cc..0000000000 --- a/testing/istate/base/sync-rcv/remote.log +++ /dev/null @@ -1,21 +0,0 @@ -xxxxxxxxxx.xxxxxx [info] [parent] raised pipe's socket buffer size from 126K to 1024K -xxxxxxxxxx.xxxxxx [info] [parent] communication started, parent -xxxxxxxxxx.xxxxxx [info] [parent] [#1/127.0.0.1:47757] added peer -xxxxxxxxxx.xxxxxx [info] [child] [#1/127.0.0.1:47757] connected -xxxxxxxxxx.xxxxxx [info] [parent] [#1/127.0.0.1:47757] peer connected -xxxxxxxxxx.xxxxxx [info] [parent] [#1/127.0.0.1:47757] phase: version -xxxxxxxxxx.xxxxxx [info] [script] [#1/127.0.0.1:47757] connection established -xxxxxxxxxx.xxxxxx [info] [script] [#1/127.0.0.1:47757] requesting events matching /^?(.*)$?/ -xxxxxxxxxx.xxxxxx [info] [script] [#1/127.0.0.1:47757] accepting state -xxxxxxxxxx.xxxxxx [info] [script] [#1/127.0.0.1:47757] requesting synchronized state -xxxxxxxxxx.xxxxxx [info] [parent] [#1/127.0.0.1:47757] phase: handshake -xxxxxxxxxx.xxxxxx [info] [parent] [#1/127.0.0.1:47757] peer_description is not set -xxxxxxxxxx.xxxxxx [info] [parent] [#1/127.0.0.1:47757] peer supports keep-in-cache; using that -xxxxxxxxxx.xxxxxx [info] [parent] [#1/127.0.0.1:47757] phase: sync (sender) -xxxxxxxxxx.xxxxxx [info] [parent] [#1/127.0.0.1:47757] starting to send full state -xxxxxxxxxx.xxxxxx [info] [parent] [#1/127.0.0.1:47757] done sending full state -xxxxxxxxxx.xxxxxx [info] [parent] [#1/127.0.0.1:47757] phase: running -xxxxxxxxxx.xxxxxx [info] [script] [#1/127.0.0.1:47757] connection closed -xxxxxxxxxx.xxxxxx [info] [parent] [#1/127.0.0.1:47757] peer disconnected -xxxxxxxxxx.xxxxxx [info] [child] [#1/127.0.0.1:47757] connection closed -xxxxxxxxxx.xxxxxx [info] [parent] [#1/127.0.0.1:47757] closing connection diff --git a/testing/istate/base/sync-rcv/stderr.log b/testing/istate/base/sync-rcv/stderr.log deleted file mode 100644 index 788f8009fe..0000000000 --- a/testing/istate/base/sync-rcv/stderr.log +++ /dev/null @@ -1 +0,0 @@ -xxxxxxxxxx.xxxxxx received termination signal diff --git a/testing/istate/base/sync-rcv/stdout.log b/testing/istate/base/sync-rcv/stdout.log deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/testing/istate/base/sync-rcv/vars.log b/testing/istate/base/sync-rcv/vars.log deleted file mode 100644 index a86d2a82da..0000000000 --- a/testing/istate/base/sync-rcv/vars.log +++ /dev/null @@ -1,34 +0,0 @@ -421 -1234567 -Jodel -4.3.2.1 -4.0.0.0/8 -21.0 -192.150.186 -42.0 secs -{ -[3] = asdfg1, -[1] = asdfg2 -} -file "test2" of string -/^?(abbcdefgh)$?/ -{ -3, -5, -6, -4, -2 -} -{ -[4, JKL] = 104, -[2, DEF] = 103, -[3, GHI] = 103 -} -{ -[12345] = /^?(12345)$?/, -[6767] = /^?(QWERTZ)$?/, -[12346] = /^?(12345)$?/ -} -6667/tcp -[2, 20, 3, 4] -[a=zxzxzx, b=[a=pop, b=43, c=9.999], c=[a=IOIOI, b=201, c=612.2], d=6.6666] diff --git a/testing/istate/base/sync-send/stderr.log b/testing/istate/base/sync-send/stderr.log deleted file mode 100644 index 4f2df4e549..0000000000 --- a/testing/istate/base/sync-send/stderr.log +++ /dev/null @@ -1,2 +0,0 @@ -xxxxxxxxxx.xxxxxx processing suspended -xxxxxxxxxx.xxxxxx processing continued diff --git a/testing/istate/base/sync-send/stdout.log b/testing/istate/base/sync-send/stdout.log deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/testing/istate/base/sync-send/vars.log b/testing/istate/base/sync-send/vars.log deleted file mode 100644 index a86d2a82da..0000000000 --- a/testing/istate/base/sync-send/vars.log +++ /dev/null @@ -1,34 +0,0 @@ -421 -1234567 -Jodel -4.3.2.1 -4.0.0.0/8 -21.0 -192.150.186 -42.0 secs -{ -[3] = asdfg1, -[1] = asdfg2 -} -file "test2" of string -/^?(abbcdefgh)$?/ -{ -3, -5, -6, -4, -2 -} -{ -[4, JKL] = 104, -[2, DEF] = 103, -[3, GHI] = 103 -} -{ -[12345] = /^?(12345)$?/, -[6767] = /^?(QWERTZ)$?/, -[12346] = /^?(12345)$?/ -} -6667/tcp -[2, 20, 3, 4] -[a=zxzxzx, b=[a=pop, b=43, c=9.999], c=[a=IOIOI, b=201, c=612.2], d=6.6666] diff --git a/testing/istate/istate.py b/testing/istate/istate.py deleted file mode 100755 index 72b3eb4288..0000000000 --- a/testing/istate/istate.py +++ /dev/null @@ -1,174 +0,0 @@ -#! /usr/bin/env python -# -# Tests persistence. -# -# $Id: istate.py,v 1.1.2.4 2005/10/11 22:31:42 sommer Exp $ - -import time -import os -import os.path -import optparse -import sys -import subprocess - -import tests - -optparser = optparse.OptionParser( usage = "%prog [options]", version = "0.1" ) -optparser.add_option( "-s", "--show-diff", action = "store_true", dest = "showdiff", - default = False, help = "show diffs of mismatches" ) -optparser.add_option( "-b", "--new-base", action = "store_true", dest = "newbase", - default = False, help = "create new baseline" ) -optparser.add_option( "-d", "--debug", action = "store_true", dest = "debug", - default = False, help = "enable debug output" ) -optparser.add_option( "-t", "--set", action = "store", type = "string", dest = "set", - default = None, help = "only do given test set" ) - - -( tests.Options, args ) = optparser.parse_args() - -if len(args) != 0: - optparser.error( "Wrong number of arguments" ) - -########################################## -# Write persistent data and read it back. -########################################## - -if tests.testSet("persistence"): - - tests.spawnBro("persistence-write", - ["-r", os.path.join(tests.Traces, "empty.trace"), - os.path.join(tests.Scripts, "vars-init.bro"), - os.path.join(tests.Scripts, "vars-print.bro")]) - tests.waitProc("persistence-write") - tests.finishTest("persistence-write", ["stdout.log", "stderr.log", "vars.log"]) - - tests.spawnBro("persistence-read", - [os.path.join(tests.Scripts, "vars-declare.bro"), - os.path.join(tests.Scripts, "vars-print.bro")], - copy=[os.path.join(tests.workDir("persistence-write"), ".state")]) - tests.waitProc("persistence-read") - tests.finishTest("persistence-read", ["stdout.log", "stderr.log", "vars.log"]) - - tests.compareFiles("persistence-write", "persistence-read", ["vars.log"]) - -########################################## -# Exchange events (clear-text). -# -# The used trace contains two connections separated by a silence of a -# couple of seconds. We start the processes so that the events for the -# *second* one (which is a full HTTP connection) are exchanged. -########################################## - -if tests.testSet("events"): - - tests.spawnBro("events-send", - ["-r", os.path.join(tests.Scripts, os.path.join(tests.Traces, "web.trace")), - "--pseudo-realtime", - "-C", - os.path.join(tests.Scripts, "events-send.bro")]) - time.sleep(2) - tests.spawnBro("events-rcv", - [os.path.join(tests.Scripts, "events-rcv.bro")]) - tests.waitProc("events-send") - tests.killProc("events-rcv") - tests.finishTest("events-send", ["stdout.log", "stderr.log", "http.log", "conn.log"], ignoreTime=True) - tests.finishTest("events-rcv", ["stdout.log", "stderr.log", "http.log", "conn.log"], ignoreTime=True) - - tests.spawnBro("events-display", - ["-x", os.path.join(tests.workDir("events-rcv"), "events.bst")]) - tests.waitProc("events-display") - tests.finishTest("events-display", ["stdout.log"], ignoreTime=True, sort=True, delete=['127.0.0.1:[0-9]*',"Event.*remote_.*"]) - - tests.compareFiles("events-send", "events-rcv", ["http.log"], ignoreTime=True, ignoreSessionID=True) - -########################################## -# Exchange synchronized state -########################################## - -if tests.testSet("sync"): - - tests.spawnBro("sync-send", - [os.path.join(tests.Scripts, "vars-sync-send.bro")]) - tests.spawnBro("sync-rcv", - [os.path.join(tests.Scripts, "vars-sync-rcv.bro")]) - tests.waitProc("sync-send") - time.sleep(1) - tests.killProc("sync-rcv") - tests.finishTest("sync-send", ["stdout.log", "stderr.log", "vars.log"], ignoreTime=True) - tests.finishTest("sync-rcv", ["stdout.log", "stderr.log", "vars.log", "remote.log"], ignoreTime=True, delete=["pid.*pid.*", "temporarily unavailable \\[..\\]"]) - - tests.compareFiles("sync-send", "sync-rcv", ["vars.log"], ignoreTime=True) - -# Old version -# tests.spawnBro("sync-send", -# ["-r", os.path.join(tests.Scripts, os.path.join(tests.Traces, "web.trace")), -# "--pseudo-realtime", -# "-C", -# os.path.join(tests.Scripts, "vars-sync-send.bro")]) - -########################################## -# Test Broccoli with bro-ping -########################################## - - -if tests.testSet("broccoli"): - - broctest = os.path.join(tests.BroBase, "aux/broccoli/test") - broclib = os.path.join(tests.BroBase, "build/aux/broccoli/src/") - broping = os.path.join(tests.BroBase, "build/aux/broccoli/test/broping") - - brocpy = os.path.join(tests.BroBase, "build/aux/broccoli/bindings/broccoli-python") - - broccoli = True - - # Test if Broccoli was compiled. - if not os.path.exists(broping): - print " Broccoli was not compiled, skipping tests." - broccoli = False - - # Test if this is a IPv6 Bro. - if broccoli: - v6 = subprocess.call(["grep", "-q", "#define BROv6", os.path.join(tests.BroBase, "build/config.h")]) - if v6 == 0: - print " Bro built with IPv6 support not compatible with Broccoli, skipping tests." - broccoli = False - - if broccoli: - tests.spawnBro("bro-ping", [os.path.join(broctest, "broping-record.bro")]) - time.sleep(1) - tests.spawnProc("broccoli-ping", - [broping, - "-r", - "-c", "5", - "127.0.0.1"]) - tests.waitProc("broccoli-ping") - tests.killProc("bro-ping") - - tests.finishTest("bro-ping", ["stdout.log", "stderr.log", "remote.log"], - ignoreTime=True, delete=["127.0.0.1:[0-9]*", "pid.*pid.*", - ".*Resource temporarily unavailable.*", ".*connection closed.*", - ".*peer disconnected.*"]) - tests.finishTest("broccoli-ping", ["stdout.log", "stderr.log"], - delete=["time=.* s$"]) - - # Test if Python binding are installed. - sopath = subprocess.Popen(["find", brocpy, "-name", "_broccoli_intern.so"], stdout=subprocess.PIPE).communicate()[0] - if sopath != "": - - os.environ["LD_LIBRARY_PATH"] = broclib - os.environ["DYLD_LIBRARY_PATH"] = broclib - os.environ["PYTHONPATH"] = os.path.dirname(sopath) - - tests.spawnBro("python-bro", [os.path.join(brocpy, "tests/test.bro")]) - time.sleep(1) - tests.spawnProc("python-script", [os.path.join(brocpy, "tests/test.py")]) - tests.waitProc("python-script") - tests.killProc("python-bro") - tests.finishTest("python-bro", ["stdout.log"], ignoreTime=True) - tests.finishTest("python-script", ["stdout.log"], ignoreTime=True, delete=["0x[^>]*", ".[0-9]{2}"]) - else: - print " Python bindings not built, skipping test." - print " (To build: cd %s && python setup.py build)" % brocpy - - - diff --git a/testing/istate/rndseed.dat b/testing/istate/rndseed.dat deleted file mode 100644 index 3bc70c899b..0000000000 --- a/testing/istate/rndseed.dat +++ /dev/null @@ -1,17 +0,0 @@ -1971283154 -1128552575 -26676 -875311974 -790730425 -1553617948 -3593004090 -2070230499 -1420669195 -754343139 -2906181924 -542878596 -2459738795 -924396623 -743111462 -3363354015 -198575356 diff --git a/testing/istate/scripts/events-rcv.bro b/testing/istate/scripts/events-rcv.bro deleted file mode 100644 index a345e3fa49..0000000000 --- a/testing/istate/scripts/events-rcv.bro +++ /dev/null @@ -1,18 +0,0 @@ -# $Id: events-rcv.bro,v 1.1.2.1 2005/10/07 01:59:12 sommer Exp $ - -@load tcp -@load http-request -@load http-reply -@load http-header -@load http-body -@load http-abstract - -@load capture-events -@load remote - -redef peer_description = "events-rcv"; - -redef Remote::destinations += { - ["foo"] = [$host = 127.0.0.1, $events = /.*/, $connect=T] -}; - diff --git a/testing/istate/scripts/events-send.bro b/testing/istate/scripts/events-send.bro deleted file mode 100644 index 00975fd723..0000000000 --- a/testing/istate/scripts/events-send.bro +++ /dev/null @@ -1,21 +0,0 @@ -# $Id: events-send.bro,v 1.1.2.1 2005/10/07 01:59:12 sommer Exp $ - -@load tcp -@load http-request -@load http-reply -@load http-header -@load http-body -@load http-abstract -@load listen-clear - -@load capture-events - -redef peer_description = "events-send"; - -# Make sure the HTTP connection really gets out. -# (We still miss one final connection event because we shutdown before -# it gets propagated but that's ok.) -redef tcp_close_delay = 0secs; - - - diff --git a/testing/istate/scripts/vars-declare.bro b/testing/istate/scripts/vars-declare.bro deleted file mode 100644 index 871e518109..0000000000 --- a/testing/istate/scripts/vars-declare.bro +++ /dev/null @@ -1,36 +0,0 @@ -# $Id: vars-declare.bro,v 1.1.2.2 2005/10/11 21:15:05 sommer Exp $ -# -# Declares variables. - -global foo1: count &persistent &synchronized; -global foo2: int &persistent &synchronized; -global foo3: string &persistent &synchronized; -global foo4: addr &persistent &synchronized; -global foo5: subnet &persistent &synchronized; -global foo6: double &persistent &synchronized; -global foo7: net &persistent &synchronized; -global foo8: interval &persistent &synchronized; -global foo9: table[count] of string &persistent &synchronized; -global foo10: file &persistent &synchronized; -global foo11: pattern &persistent &synchronized; -global foo12: set[count] &persistent &synchronized; -global foo13: table[count, string] of count &persistent &synchronized; -global foo14: table[count] of pattern &persistent &synchronized; -global foo15: port &persistent &synchronized; -global foo16: vector of count &persistent &synchronized; - -type type1: record { - a: string; - b: count &default=42; - c: double &optional; - }; - -type type2: record { - a: string; - b: type1; - c: type1; - d: double; - }; - -global foo17: type2 &persistent &synchronized; - diff --git a/testing/istate/scripts/vars-init.bro b/testing/istate/scripts/vars-init.bro deleted file mode 100644 index 79b1345f31..0000000000 --- a/testing/istate/scripts/vars-init.bro +++ /dev/null @@ -1,42 +0,0 @@ -# $Id: vars-init.bro,v 1.1.2.2 2005/10/11 21:15:05 sommer Exp $ -# -# Instantiates variables. - -global foo1 = 42 &persistent &synchronized; -global foo2 = -42 &persistent &synchronized; -global foo3 = "Hallihallo" &persistent &synchronized; -global foo4 = 1.2.3.4 &persistent &synchronized; -global foo5 = 1.2.0.0/16 &persistent &synchronized; -global foo6 = 3.14 &persistent &synchronized; -global foo7 = 131.159. &persistent &synchronized; -global foo8 = 42 secs &persistent &synchronized; -global foo9 = { [1] = "qwerty", [2] = "uiop" } &persistent &synchronized; -global foo10 = open("test") &persistent &synchronized; -global foo11 = /12345/ &persistent &synchronized; -global foo12 = { 1,2,3,4,5 } &persistent &synchronized; -global foo13 = { [1,"ABC"] = 101, [2,"DEF"] = 102, [3,"GHI"] = 103 } &persistent &synchronized; -global foo14 = { [12345] = foo11, [12346] = foo11 } &persistent &synchronized; -global foo15 = 42/udp &persistent &synchronized; -global foo16: vector of count = [1,2,3] &persistent &synchronized; - -type type1: record { - a: string; - b: count &default=42; - c: double &optional; - }; - -type type2: record { - a: string; - b: type1; - c: type1; - d: double; - }; - -global foo17: type2 = [ - $a = "yuyuyu", - $b = [$a="rec1", $b=100, $c=1.24], - $c = [$a="rec2", $b=200, $c=2.24], - $d = 7.77 - ] &persistent &synchronized; - - diff --git a/testing/istate/scripts/vars-modify.bro b/testing/istate/scripts/vars-modify.bro deleted file mode 100644 index 51f723f90d..0000000000 --- a/testing/istate/scripts/vars-modify.bro +++ /dev/null @@ -1,61 +0,0 @@ -# $Id: vars-modify.bro,v 1.1.2.2 2005/10/11 21:15:05 sommer Exp $ -# -# Performs modifications on variables. - -function modify() - { - foo1 = 420; - ++foo1; - - --foo2; - - foo3 = "Jodel"; - - foo4 = 4.3.2.1; - - foo5 = 4.0.0.0/8; - - foo6 = 21; - - foo7 = 192.150.186; - - foo9[3] = "asdfg1"; - foo9[1] = "asdfg2"; - delete foo9[2]; - - foo10 = open("test2"); - - foo11 = /abbcdefgh/; - - add foo12[6]; - delete foo12[1]; - - foo13[4,"JKL"] = 104; - delete foo13[1,"ABC"]; - ++foo13[2,"DEF"]; - - foo14[6767] = /QWERTZ/; - - foo15 = 6667/tcp; - - foo16[4] = 4; - foo16[2] = 20; - ++foo16[1]; - - local x: type1; - x$a = "pop"; - ++x$b; - x$c = 9.999; - foo17$a = "zxzxzx"; - foo17$b = x; - foo17$c$a = "IOIOI"; - ++foo17$c$b; - foo17$c$c = 612.2; - foo17$d = 6.6666; - - foo2 = 1234567; - } - - - - diff --git a/testing/istate/scripts/vars-print.bro b/testing/istate/scripts/vars-print.bro deleted file mode 100644 index 26d846c9cc..0000000000 --- a/testing/istate/scripts/vars-print.bro +++ /dev/null @@ -1,29 +0,0 @@ -# $Id: vars-print.bro,v 1.1.2.2 2005/10/11 21:15:05 sommer Exp $ -# -# Print variables. - -event bro_done() - { - local out = open("vars.log"); - print out, foo1; - print out, foo2; - print out, foo3; - print out, foo4; - print out, foo5; - print out, foo6; - print out, foo7; - print out, foo8; - print out, foo9; - print out, foo10; - print out, foo11; - print out, foo12; - print out, foo13; - print out, foo14; - print out, foo15; - print out, foo16; - print out, foo17; - } - - - - diff --git a/testing/istate/scripts/vars-sync-rcv.bro b/testing/istate/scripts/vars-sync-rcv.bro deleted file mode 100644 index 145afd6ff6..0000000000 --- a/testing/istate/scripts/vars-sync-rcv.bro +++ /dev/null @@ -1,13 +0,0 @@ -# $Id: vars-sync-rcv.bro,v 1.1.2.1 2005/10/11 21:15:05 sommer Exp $ - -@load vars-init -@load vars-print - -@load capture-events -@load remote - - -redef Remote::destinations += { - ["foo"] = [$host = 127.0.0.1, $events = /.*/, $connect=T, $sync=T] -}; - diff --git a/testing/istate/scripts/vars-sync-send.bro b/testing/istate/scripts/vars-sync-send.bro deleted file mode 100644 index 655c8a36ea..0000000000 --- a/testing/istate/scripts/vars-sync-send.bro +++ /dev/null @@ -1,20 +0,0 @@ -# $Id: vars-sync-send.bro,v 1.1.2.1 2005/10/11 21:15:05 sommer Exp $ -# - -@load vars-init -@load vars-print -@load vars-modify - -@load listen-clear - -event remote_connection_handshake_done(p: event_peer) - { - modify(); - terminate_communication(); - } - -redef Remote::destinations += { - ["foo"] = [$host = 127.0.0.1, $sync=T] -}; - - diff --git a/testing/istate/tests.py b/testing/istate/tests.py deleted file mode 100644 index 0673108563..0000000000 --- a/testing/istate/tests.py +++ /dev/null @@ -1,300 +0,0 @@ -# $Id: tests.py,v 1.1.2.5 2005/10/11 22:31:42 sommer Exp $ -# -# Various helper functions. - -import sys -import os -import copy -import errno -import signal -import subprocess - -# Path to our files. -Testing = os.path.abspath(".") - -# Path to top-level Bro directory. -if os.path.exists("../../build/src/bro"): - BroBase = os.path.abspath("../..") -else: - error("cannot find build directory") - -# Path where tmp files are created. -Tmp = os.path.join(Testing, "tmp") - -# Path to seed file. -BroSeed = os.path.join(Testing, "rndseed.dat") - -# Path to our test scripts. -Scripts = os.path.join(Testing, "scripts") - -# Path to our test traces. -Traces = os.path.join(Testing, "traces") - -# Where the base files to compare against are stored. -Base = os.path.join(os.getcwd(), "./base") - -# Process ID of all processes we've spawned, indexed by textual tag *and* pid. -Running = {} - -# Set to true when at least one check failed. -Failed = False - -# getopt options -Options = None - -def error(str): - print >>sys.stderr, "Error:", str - sys.exit(1) - -def debug(str): - if Options.debug: - print >>sys.stderr, "Debug:", str - -def log(str): - print >>sys.stderr, str - -# Returns full path of given process' working directory. -def workDir(tag): - return os.path.join(Tmp, tag) - -# Intializes work dir for given process. -def initWorkDir(tag): - - try: - os.mkdir(Tmp) - except OSError, e: - if e.errno != errno.EEXIST: - raise - - os.system("rm -rf " + workDir(tag)) - os.mkdir(workDir(tag)) - -# Spawns process identified by the given tag. Enters process into RunningBro. -def spawnProc(tag, cmdline, copy=[]): - initWorkDir(tag) - os.chdir(workDir(tag)) - - for i in copy: - debug("Copying %s into workdir of %s" % (i, tag)) - os.system("cp -r %s %s" % (i, workDir(tag))) - - debug("Spawning '%s' as %s" % (" ".join(cmdline), tag)) - - saved_stdin = os.dup(0) - saved_stdout = os.dup(1) - saved_stderr = os.dup(2) - child_stdin = open("/dev/null", "r") - child_stdout = open("stdout.log", "w") - child_stderr = open("stderr.log", "w") - os.dup2(child_stdin.fileno(), 0) - os.dup2(child_stdout.fileno(), 1) - os.dup2(child_stderr.fileno(), 2) - pid = os.spawnvp(os.P_NOWAIT, cmdline[0], cmdline) - os.dup2(saved_stdin, 0) - os.dup2(saved_stdout, 1) - os.dup2(saved_stderr, 2) - - Running[tag] = pid - Running[pid] = tag - -# Spaws a Bro process. -def spawnBro(tag, args, copy=[]): - bropath = os.path.join(BroBase, "policy") - bropath += ":" + os.path.join(BroBase, "build/src") - - os.putenv("BROPATH", bropath + ":" + Scripts) - os.unsetenv("BRO_LOG_SUFFIX") - args += ["--load-seeds", BroSeed, "-B", "state,comm"] - spawnProc(tag, [os.path.join(BroBase, "build/src/bro")] + args, copy=copy) - -# Examines a process' exit code. -def parseExitCode(tag, result): - if os.WCOREDUMP(result): - error("process %s core dumped." % tag) - - if os.WIFSIGNALED(result): - error("process %s got signal %d." % (tag, os.WTERMSIG(result))) - - if not os.WIFEXITED(result): - error("process %s exited abnormally (%d)." % (tag, result)) - - result = os.WEXITSTATUS(result) - debug("process %s exited with %d" % (tag, result)) - - return result - -# Waits for process to finish. -def waitProc(tag): - (pid, result) = os.waitpid(Running[tag], 0) - result = parseExitCode(tag, result) - if result != 0: - error("Execution of %s failed." % tag) - - del Running[pid] - del Running[tag] - -# Waits for all of our processes to terminte. -def waitProcs(): - while Running: - (pid, result) = os.waitpid(0, 0) - parseExitCode(Running[pid], result) - del Running[Running[pid]] - del Running[pid] - -# Kills the process and waits for its termination. -def killProc(tag): - pid = Running[tag] - debug("Killing %s..." % tag) - os.kill(pid, signal.SIGTERM) - (pid, result) = os.waitpid(pid, 0) - parseExitCode(tag, result) - del Running[pid] - del Running[tag] - -# Cleans up temporary stuff -def cleanup(): - os.system("rm -rf " + Tmp) - -# Canonicalizes file content for diffing. -def canonicalizeFile(file, ignoreTime, ignoreSessionID, sort, delete): - - cmd = [] - - if delete: - for i in delete: - cmd += ["sed 's/%s//g' | grep -v '^$'" % i] - - if ignoreTime: - cmd += ["sed 's/[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]\.[0-9][0-9]\{0,6\}/xxxxxxxxxx.xxxxxx/g'"] - - if ignoreSessionID: - # A session is either "%1" or "%my-peer-description-1" - cmd += ["sed 's/%\([^ ]*-\)\{0,1\}[0-9][0-9]*/%XXX/g'"] - - if sort: - cmd += ["LC_ALL=c sort"] - - if not cmd: - return - - tmp = file + ".tmp" - cmd = "cat %s | %s >%s" % (file, " | ".join(cmd), tmp) - - debug("Canonicalizing '%s'" % cmd) - os.system(cmd) - os.system("mv %s %s" % (tmp, file)) - -# Diffs the two files, If mismatch, prints "FAILED" and returns true. -def diff(file1, file2): - - quiet = ">/dev/null" - if Options.showdiff: - quiet = "" - - for f in (file1, file2): - if not os.path.exists(f): - print "FAILED (%s does not exist)" % f - return False - - diff = "diff -u %s %s %s" % (file1, file2, quiet) - - debug("Executing '%s'" % diff) - result = os.system(diff) - - if os.WEXITSTATUS(result) != 0: - print "FAILED" - return False - - return True - -# Compares files of process against base version. Returns false if mismatch found. -def checkFiles(tag, files, ignoreTime, sort, delete): - base = os.path.join(Base, tag) - work = workDir(tag) - - print " Checking %s..." % tag, - - failed = False - - for file in files: - oldfile = os.path.join(base, file) - newfile = os.path.join(work, file) - - canonicalizeFile(newfile, ignoreTime, False, sort, delete) - - if not diff(oldfile, newfile): - failed = True - break - - if not failed: - print "ok" - else: - Failed = failed - -# Compares files of two processes. Return false if mismatch found. -def compareFiles(tag1, tag2, files, ignoreTime=False, ignoreSessionID=False, sort=False, delete=None): - work1 = workDir(tag1) - work2 = workDir(tag2) - - print " Comparing %s with %s..." % (tag1, tag2), - - failed = False - - for file in files: - file1 = os.path.join(work1, file) - file2 = os.path.join(work2, file) - - canonicalizeFile(file1, ignoreTime, ignoreSessionID, sort, delete) - canonicalizeFile(file2, ignoreTime, ignoreSessionID, sort, delete) - - if not diff(file1, file2): - failed = True - break - - if not failed: - print "ok" - else: - Failed = failed - -# Make the result of process new baseline. -def makeNewBase(tag, files, ignoreTime, sort, delete): - - try: - os.mkdir(Base) - except OSError, e: - if e.errno != errno.EEXIST: - raise - - base = os.path.join(Base, tag) - work = workDir(tag) - - print " Copying files for %s..." % tag - - try: - os.mkdir(base) - except OSError, e: - if e.errno != errno.EEXIST: - raise - - # Delete all files but those belonging to CVS. - os.system("find %s -type f -not -path '*/CVS/*' -not -path '*/.svn/*' -exec rm '{}' ';'" % base) - - for file in files: - oldfile = os.path.join(work, file) - newfile = os.path.join(base, file) - os.system("cp %s %s" % (oldfile, newfile)) - canonicalizeFile(newfile, ignoreTime, False, sort, delete) - -def testSet(set): - if Options.set and set != Options.set: - return False - - print "Running set '%s' ..." % set - return True - -# Either check given files or make it new baseline, depending on options. -def finishTest(tag, files, ignoreTime=False, sort=False, delete=None): - if Options.newbase: - makeNewBase(tag, files, ignoreTime, sort, delete) - else: - checkFiles(tag, files, ignoreTime, sort, delete) diff --git a/testing/istate/traces/empty.trace b/testing/istate/traces/empty.trace deleted file mode 100644 index 3ee11171227865ef8ba4294a2ff82a1e60158ff5..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 24 Ycmca|c+)~A1{MYwxWLZ9zzF0307)YQ$p8QV diff --git a/testing/istate/traces/web.trace b/testing/istate/traces/web.trace deleted file mode 100644 index 165108519011f9bbad4340e828c2e82f9b6d4025..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 11525 zcmcIqTZ|;vS#Ixo9lMgT*TD*Q!sTp-8D_lGRdZXD9ruigBjsU*Yy}}pNIW3qMMC(6#3aNIF#;2K!0Qkr6d@!_ zeE&IB)zz078_A5ex9gm)^Pm6x_sjYItv~zYGr2o+=^xAG?!e%yXE)1hPo2wM!83hw zfBO1YZ|8E~J^Sc?YrEg0mtQ{f zneSfwK`wXZ&U3HbdFF1#y7@y+^LLy*dxjwYYyR$B5o7vDm=eB#Jo(tWE4k^r?s$=) z67-qNZ@)w@0{WZ#59D(1K2Ib1`yIfl{_|a@VEM-92uo`##qyiE{int+RA@C}8GS8_ z<-1jyCoBo_%AefRgDg&-!LqpWJ;E~g`w5o0{kOmQ@~!*IfPUrWPybVH>jeoJ&~kU& zakujGU;3jjSvTLU66C*q<(}LscB0P^Wf$J~1%dP40M1tceeL-Cxz~374LAa#b@TQ; z1eGA}yn0XW+WuUvzRU!2KO-au=ennvgHPNJUTj3EyMCv*Kds}W!G`I5n8UZ$gXnk6-u^s z$j6j1g>b&~o1e=4`?;L>3`)VdAFaGe^!=ar2k5&7`o3~}{+*Q@k4crflm$SlDq*t7&m_1gzOd2-eK3gtcDRTZ=3|XIy^7D9p|4dSPLH;Sqg? zU&<%6DpYl+#e+rG=!QHH1PVdb!ZvqWVSABXo}C9>d!$-qq1EAT6fVtPnr0pS`qJzS zUO0)am>1ycT@ObO`Snn1haH;;Uc9ijSFS&~zYezUY_t7qtJ{?_%NI25iTSdot<~4$ z4-4uHtNXeWSj0Bn*0lBAypnH+p|_}M#NMNMVy;%NYSr~}f#5I9XtwJHTs1>8zpNCu z)=O*4#d@W_y}n#2SE@x#J{L9di&9+OTYHi*4IgiK%L)zIWWCKz(u#c`d2=etcSRQ&iSW;sDg1|FtZxN*YeBBBW*Cvl-|3lIQj+-7~;?&5aq0k^98KwyB#)r`SN8Jx}*%V z?1-xjR;o|bPo)*eAP9=Bb;p!Ynvr926SB=l5l9b1I%<9yu=S4j zXq_;Z$STC1maE$VbDIDQj_JTEbQhIkWP^{kwY(qsLBv_g5Z4iirc5LTS|O}Wgq4Jn z&uviAWZ>|T>mOK7i&+6c1k(bZvakCgB*()`Oox#=8@Zdsd+XMdb+m8f2%(V2 zVXMAnwus-Lr0%f>PR;oMjnZQ!%ew+w8gbvSbelm`p%gp_17ahT;LtLOayrNug+AVZ zKt>&Q)F!bBT@PYUJnKYZgdaiwwqqGtK+Mn`V8e9N1l)j=<$vpR%m4Sn^8d8o@;`7p zvHaiuR=?#pRi&s2F@d@lFBA$==b_7vdz4YUXWT}hlD&fMXj?vxCHO_Apy7sX=D~xR zt`WL)Obmntgh7BT1rbpQ(m@s@P?bUfJGEh9l;T?DaaP){Z0;`Q%j>)Kb=V%vhI+$> zZdqp7UdqE}kLQ`eZ99OQ!M;ngkBFfMqR?~q(%ISx#NR5^OqMb&~fcMiA@sZ?r)8-}bVC+M)#Y}0omk8N|^ zu61@I;)2nnBRwb? z*EVFsH5ew>?*b#?Jmg5ykYL03rKit;=>)zNYx+*DDqO&{(DYF+8$qAfz*g7FENk4S z*r<~uY9T@?kK>!|>(>L6JqLgK*J=y@myPX3CK5z;A^P#iIA?coc-J#xYDxt3`zga?uyTOkx>Td&Yp`Am{_`SM);* z2Cpn91el@Mb@;6a@0RGBZMNN@EzlkY+;&aKCt3cV9)Iez%;%Rx=Cd=9r@Zp=tp{!& zpTGNSYfEXK@;b%+1kwD;sStlzK-?aN_}On9pa0}Ya{}m%I)F?fHo9*p?u|Xi|DQMYni$Up%m?Zn}Z3AG(Jl zDVkw8q5~CyfM=;zsNJw5t7YYvx9N*jt>>PTsx-j5c)2HBiP}Vf*a%D^H8&ca09dU0 zk-=Hb>UgnPIZ+0$l~>d7`9tI@gY=L!G1|Trgf8t}jvryv;2y1x6@q%vD6*Xfkf0$B z0lW%GUlW4_Mpm63k4*z<|4E7w@6$qnr3TN05qT@saI}z9&gci4iR|rJC;p-c1AIjK zfM^Gy#TO&XDePKo4KE1{M1;a*FkWjTA8hLuyJG2X=pxWU<_WV3d({;|hU8qG^G*cI z;JFTWWQfDqG~42KfE>v}CX*y56wFi{{NK?je`9qD$dG2WQgHJ0Lk@X_o!o<;^wWS_ za2GybI3t9E@X$*M^N7jk!DLWoo4iV|-B-Z#sK;t~8+x)o{#1`mb63+ttfNgf|rVfoekvecThTe%C z&JDvmn7ahjq{djF?^T~$4S3@ed}`eLDHIvdcM)?nd>!(42n1JkUq@_Im17Z1NJ;B+ z5)MB~f?yd*@A9KKktU8K+>!#4)v;^H3jLO^n-Qg2qs3!~qBd^BNJ1eI-oi1J{IDJQ z>KZ9DgFSBChWtqm$+T*6Ei22g36Iq~G$h zVq*D!>mU0qzX&N}?C=$uP=`!>PdUMe_&#dbFkGa(0T%T|`RUnI&2K``;#{V>QAQ91 z(u?3$X3tUBrhrF~tQWhenq(diOJV7`GM9CtN^~%TT3frs741ykH&OuKy)Xl2` z34(*uDY6)&#Hhr(CVBJX7iKg$r5P=&K%wud?;=C`V#NKf>OrSk)?*DZwUp4OASp5N zEWNWdKKF%^py>E~>0*rE#l7l9k>Suo9OTiXM3A0jBsV^Hc>;EfH*LMO-u6eGlA+JVgUKxB{4+49ND4x87bt%=k| zi>QH0RlvEgLiklL5Fv$T1dl!2STY+<)ES>&n;oAkKO3Tui)XwpEW+Z%vr7W{_}t8q zHi!RXlH}|(=3_;kV5hiCZ0Cf5>Nt4x(8JH^&`Zw!4z!1p&G z1OpRCEi=&#*#!aSdJKKnW}s^5q9HqqDWa;+4JW4QdU;pETfgoh zSFyq@yj`~^HAAp60+U4NqCu@v$sVF1;x*hgI4r~y2^UE>fH}4E=w~GOC$L|}13ow7 zmDTk%p?3-bKXeb##(=%(K(q%6^2n&TS@5WNfhC1~v1(YlB=~j^8eY7?mep$4JPyR5 zKD1T3s6XNprhz(nhJ)q+q!iU2^-x!%V1NR9+iM!YqxNPGQh^k-f_ZTOVKg!uR?(<{ zeS*y@psXLE#7(c0=ZOPmRcnawpjs{97dohTAP_O5FrAemdDuWV4w6K%Rw`eWyQnyzDiDhyt(N*TLJ3g$ zHiQb)Q3#`wRz?9}BzvgGVrH2g-3wICkt#zXx2YmvBZU1qY=S_zGiwD6)xEGWs(ZNJatXnkq+8M-PB7nqeI@Apmcu zvMXq&Ozt2PgfYf_lm?PXlZt%kz!JXbzQ#Tgu8jJV=w6ngPv~hw9AGI7_^g3KKt>V0 zzz{pe9s?)W98_Jg`EF%LUSF8p6~YF%>G5{B9>9MQ#|af5h@oaoF0IEx(XY&iAFPY5 zH_%z(@M zTW4~gJDU@q!G6ivv6Z*TgMRQA{T_67L3q#y-&xuFZwV1J{5|XDdtVkp&fvCTBLgb@ zxH1HZ^)Z#Fj0i(>AX`zVVd+AYZ?s#17Fgu`YL(dc)c{RKSqKMYz%}6VdT~wHwQ!G# zJ&7-2B_`3@O7zZ%+5!xIzI$67!X~l7#lWp;C;Cj)f@r9r1?t zFx**sRScIM(oVRtXTv=)gx$mkX?|h4!Zz+{U?HPGewyyzSP0z3O(YD^kaPsIR9LXp z>awx{LUmkRJ)x*QX>tg1Nk|kOaG$QqSvD(HmSJ31QY?yEWm%<=iy+lqv^GRkl@c?+ zRTT#YFs6FsL;+oD5toC|kP*~J0Z4bcWOQ8=r%5n^-flYlE+5zrjHl~v%L*BY#*faN z*8cnzp?sUe>bx*^eEy;1PycSBd_S2db$JmGOP@H^K#U8B8zUj!|IqP$PbU!H*As}f zzsuk_cxv`k4^UtiC@9Tu)*H4G|F9PD%M?$`gGTJtmv1fHOLV-qoSgbUA0(*%3#59B0RR91 From b16bb7fff44d3e7bd578e2b8ef82355353dc0602 Mon Sep 17 00:00:00 2001 From: Robin Sommer Date: Tue, 10 May 2011 19:33:37 -0700 Subject: [PATCH 11/16] Test updates. Includes splitting up one test which's output now depends on wether we've compiled with IPv6 support or not. --- .../conn.log | 0 .../btest/Baseline/core.print-bpf-filters-ipv4/output | 4 ++++ .../btest/Baseline/core.print-bpf-filters-ipv6/conn.log | 1 + .../output | 0 testing/btest/Baseline/logging.rotate-custom/out | 4 ++-- ...{print-bpf-filters.bro => print-bpf-filters-ipv4.bro} | 2 ++ testing/btest/core/print-bpf-filters-ipv6.bro | 9 +++++++++ 7 files changed, 18 insertions(+), 2 deletions(-) rename testing/btest/Baseline/{core.print-bpf-filters => core.print-bpf-filters-ipv4}/conn.log (100%) create mode 100644 testing/btest/Baseline/core.print-bpf-filters-ipv4/output create mode 100644 testing/btest/Baseline/core.print-bpf-filters-ipv6/conn.log rename testing/btest/Baseline/{core.print-bpf-filters => core.print-bpf-filters-ipv6}/output (100%) rename testing/btest/core/{print-bpf-filters.bro => print-bpf-filters-ipv4.bro} (84%) create mode 100644 testing/btest/core/print-bpf-filters-ipv6.bro diff --git a/testing/btest/Baseline/core.print-bpf-filters/conn.log b/testing/btest/Baseline/core.print-bpf-filters-ipv4/conn.log similarity index 100% rename from testing/btest/Baseline/core.print-bpf-filters/conn.log rename to testing/btest/Baseline/core.print-bpf-filters-ipv4/conn.log diff --git a/testing/btest/Baseline/core.print-bpf-filters-ipv4/output b/testing/btest/Baseline/core.print-bpf-filters-ipv4/output new file mode 100644 index 0000000000..2b517e8666 --- /dev/null +++ b/testing/btest/Baseline/core.print-bpf-filters-ipv4/output @@ -0,0 +1,4 @@ +not ip6 +not ip6 +(not ip6) and (tcp[13] & 7 != 0) +port 42 diff --git a/testing/btest/Baseline/core.print-bpf-filters-ipv6/conn.log b/testing/btest/Baseline/core.print-bpf-filters-ipv6/conn.log new file mode 100644 index 0000000000..fc0008ea13 --- /dev/null +++ b/testing/btest/Baseline/core.print-bpf-filters-ipv6/conn.log @@ -0,0 +1 @@ +1128727435.450898 1.733303 141.42.64.125 125.190.109.199 http 56730 80 tcp 98 9417 SF X diff --git a/testing/btest/Baseline/core.print-bpf-filters/output b/testing/btest/Baseline/core.print-bpf-filters-ipv6/output similarity index 100% rename from testing/btest/Baseline/core.print-bpf-filters/output rename to testing/btest/Baseline/core.print-bpf-filters-ipv6/output diff --git a/testing/btest/Baseline/logging.rotate-custom/out b/testing/btest/Baseline/logging.rotate-custom/out index c87445cff5..58e41291f3 100644 --- a/testing/btest/Baseline/logging.rotate-custom/out +++ b/testing/btest/Baseline/logging.rotate-custom/out @@ -28,7 +28,6 @@ 2nd test2-11-03-07_12.00.05.log test2.log 11-03-07_12.00.05 11-03-07_12.59.55 0 1st test-11-03-07_12.00.05.log test.log 11-03-07_12.00.05 11-03-07_12.59.55 1 2nd test2-11-03-07_12.59.55.log test2.log 11-03-07_12.59.55 11-03-07_12.59.55 1 -# t id.orig_h id.orig_p id.resp_h id.resp_p 1299466805.0 10.0.0.1 20 10.0.0.2 1024 1299470395.0 10.0.0.2 20 10.0.0.3 0 1299470405.0 10.0.0.1 20 10.0.0.2 1025 @@ -59,7 +58,6 @@ > test-11-03-07_10.00.05.log > test-11-03-07_11.00.05.log > test-11-03-07_12.00.05.log -> test.log > test2-11-03-07_03.00.05.log > test2-11-03-07_03.59.55.log > test2-11-03-07_04.00.05.log @@ -81,3 +79,5 @@ > test2-11-03-07_12.00.05.log > test2-11-03-07_12.59.55.log > test2.log +> test.log +# t id.orig_h id.orig_p id.resp_h id.resp_p diff --git a/testing/btest/core/print-bpf-filters.bro b/testing/btest/core/print-bpf-filters-ipv4.bro similarity index 84% rename from testing/btest/core/print-bpf-filters.bro rename to testing/btest/core/print-bpf-filters-ipv4.bro index 274eed2961..5848972166 100644 --- a/testing/btest/core/print-bpf-filters.bro +++ b/testing/btest/core/print-bpf-filters-ipv4.bro @@ -1,3 +1,5 @@ +# @TEST-REQUIRES: bro -e 'print bro_has_ipv6()' | grep -q F +# # @TEST-EXEC: bro print-filter >output 2>&1 # @TEST-EXEC: bro tcp print-filter >>output # @TEST-EXEC: bro tcp print-filter all_packets=F >>output diff --git a/testing/btest/core/print-bpf-filters-ipv6.bro b/testing/btest/core/print-bpf-filters-ipv6.bro new file mode 100644 index 0000000000..98bbc2db33 --- /dev/null +++ b/testing/btest/core/print-bpf-filters-ipv6.bro @@ -0,0 +1,9 @@ +# @TEST-REQUIRES: bro -e 'print bro_has_ipv6()' | grep -q T +# +# @TEST-EXEC: bro print-filter >output 2>&1 +# @TEST-EXEC: bro tcp print-filter >>output +# @TEST-EXEC: bro tcp print-filter all_packets=F >>output +# @TEST-EXEC: bro -f "port 42" print-filter >>output +# @TEST-EXEC: bro -C -f "port 50343" -r $TRACES/mixed-vlan-mpls.trace tcp +# @TEST-EXEC: btest-diff output +# @TEST-EXEC: btest-diff conn.log From 4bf6d6092bb5b98062de79fb2738837d62788e5e Mon Sep 17 00:00:00 2001 From: Robin Sommer Date: Tue, 10 May 2011 19:48:40 -0700 Subject: [PATCH 12/16] Sorting was still not consistent. --- testing/btest/Baseline/logging.rotate-custom/out | 4 ++-- testing/btest/btest.cfg | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/testing/btest/Baseline/logging.rotate-custom/out b/testing/btest/Baseline/logging.rotate-custom/out index 58e41291f3..c87445cff5 100644 --- a/testing/btest/Baseline/logging.rotate-custom/out +++ b/testing/btest/Baseline/logging.rotate-custom/out @@ -28,6 +28,7 @@ 2nd test2-11-03-07_12.00.05.log test2.log 11-03-07_12.00.05 11-03-07_12.59.55 0 1st test-11-03-07_12.00.05.log test.log 11-03-07_12.00.05 11-03-07_12.59.55 1 2nd test2-11-03-07_12.59.55.log test2.log 11-03-07_12.59.55 11-03-07_12.59.55 1 +# t id.orig_h id.orig_p id.resp_h id.resp_p 1299466805.0 10.0.0.1 20 10.0.0.2 1024 1299470395.0 10.0.0.2 20 10.0.0.3 0 1299470405.0 10.0.0.1 20 10.0.0.2 1025 @@ -58,6 +59,7 @@ > test-11-03-07_10.00.05.log > test-11-03-07_11.00.05.log > test-11-03-07_12.00.05.log +> test.log > test2-11-03-07_03.00.05.log > test2-11-03-07_03.59.55.log > test2-11-03-07_04.00.05.log @@ -79,5 +81,3 @@ > test2-11-03-07_12.00.05.log > test2-11-03-07_12.59.55.log > test2.log -> test.log -# t id.orig_h id.orig_p id.resp_h id.resp_p diff --git a/testing/btest/btest.cfg b/testing/btest/btest.cfg index cd81e70716..159e5a19e2 100644 --- a/testing/btest/btest.cfg +++ b/testing/btest/btest.cfg @@ -9,7 +9,7 @@ IgnoreFiles = *.tmp *.swp #* *.trace BROPATH=`bash -c %(testbase)s/../../build/bro-path-dev` BRO_SEED_FILE=%(testbase)s/random.seed TZ=UTC -LOCALE=C +LC_ALL=C PATH=%(testbase)s/../../build/src:%(testbase)s/../../aux/btest:%(default_path)s TEST_DIFF_CANONIFIER=%(testbase)s/Scripts/diff-canonifier TRACES=%(testbase)s/Traces From 4ed9969f83a08cb236f56da371fb33923ebd28e9 Mon Sep 17 00:00:00 2001 From: Robin Sommer Date: Tue, 10 May 2011 20:54:24 -0700 Subject: [PATCH 13/16] Fixing bug with uninitialized counter. --- src/SerializationFormat.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/SerializationFormat.cc b/src/SerializationFormat.cc index d385121cca..b9b3da5fef 100644 --- a/src/SerializationFormat.cc +++ b/src/SerializationFormat.cc @@ -21,6 +21,7 @@ void SerializationFormat::StartRead(char* data, uint32 arg_len) input = data; input_len = arg_len; input_pos = 0; + bytes_read = 0; } void SerializationFormat::EndRead() @@ -44,7 +45,6 @@ void SerializationFormat::StartWrite() output_pos = 0; bytes_written = 0; - bytes_read = 0; } uint32 SerializationFormat::EndWrite(char** data) From 33f1e00264d4404247724975f9f95b32730d660e Mon Sep 17 00:00:00 2001 From: Robin Sommer Date: Tue, 10 May 2011 20:57:45 -0700 Subject: [PATCH 14/16] Updating submodule(s). --- aux/btest | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aux/btest b/aux/btest index e4abef963f..f096c0e408 160000 --- a/aux/btest +++ b/aux/btest @@ -1 +1 @@ -Subproject commit e4abef963f1e85f1a0a8eb5d960d99e1766069b0 +Subproject commit f096c0e4088f2d92743e0c28077f086dff216cce From da5618b9ba0cb6a31d6426cacd51a32011e48e13 Mon Sep 17 00:00:00 2001 From: Robin Sommer Date: Tue, 10 May 2011 21:27:44 -0700 Subject: [PATCH 15/16] Portability fixes for tests on MacOS. --- testing/btest/Scripts/diff-remove-abspath | 5 +++++ 1 file changed, 5 insertions(+) create mode 100755 testing/btest/Scripts/diff-remove-abspath diff --git a/testing/btest/Scripts/diff-remove-abspath b/testing/btest/Scripts/diff-remove-abspath new file mode 100755 index 0000000000..361ad3fa6d --- /dev/null +++ b/testing/btest/Scripts/diff-remove-abspath @@ -0,0 +1,5 @@ +#! /usr/bin/env bash +# +# Replace absolute paths with the basename. + +sed 's#/\([^/]\{1,\}/\)\{1,\}\([^/]\{1,\}\)#<...>/\2#g' From 70e14cb7d5bbaaade7ceaf5ec5ad4c0d8b44dc25 Mon Sep 17 00:00:00 2001 From: Jon Siwek Date: Thu, 12 May 2011 19:55:26 -0500 Subject: [PATCH 16/16] Fix CommentedTypeDecl to track whether it's in a record like TypeDecl does. --- src/Type.cc | 4 ++-- src/Type.h | 2 +- src/parse.y | 3 ++- testing/btest/doc/record-attr-check.bro | 9 +++++++++ 4 files changed, 14 insertions(+), 4 deletions(-) create mode 100644 testing/btest/doc/record-attr-check.bro diff --git a/src/Type.cc b/src/Type.cc index 458a672d41..c770091ad6 100644 --- a/src/Type.cc +++ b/src/Type.cc @@ -848,8 +848,8 @@ void TypeDecl::DescribeReST(ODesc* d) const } CommentedTypeDecl::CommentedTypeDecl(BroType* t, const char* i, - attr_list* attrs, std::list* cmnt_list) - : TypeDecl(t, i, attrs) + attr_list* attrs, bool in_record, std::list* cmnt_list) + : TypeDecl(t, i, attrs, in_record) { comments = cmnt_list; } diff --git a/src/Type.h b/src/Type.h index 082e950921..b8cb7e2aa5 100644 --- a/src/Type.h +++ b/src/Type.h @@ -420,7 +420,7 @@ public: class CommentedTypeDecl : public TypeDecl { public: CommentedTypeDecl(BroType* t, const char* i, attr_list* attrs = 0, - std::list* cmnt_list = 0); + bool in_record = false, std::list* cmnt_list = 0); virtual ~CommentedTypeDecl(); void DescribeReST(ODesc* d) const; diff --git a/src/parse.y b/src/parse.y index 288b6c4cfe..a31b47b0bd 100644 --- a/src/parse.y +++ b/src/parse.y @@ -936,6 +936,7 @@ type_decl: if ( generate_documentation ) { + // TypeDecl ctor deletes the attr list, so make a copy attr_list* a = $5; attr_list* a_copy = 0; @@ -947,7 +948,7 @@ type_decl: } last_fake_type_decl = new CommentedTypeDecl( - $4, $2, a_copy, concat_opt_docs($1, $7)); + $4, $2, a_copy, (in_record > 0), concat_opt_docs($1, $7)); } $$ = new TypeDecl($4, $2, $5, (in_record > 0)); diff --git a/testing/btest/doc/record-attr-check.bro b/testing/btest/doc/record-attr-check.bro new file mode 100644 index 0000000000..33ada44bfd --- /dev/null +++ b/testing/btest/doc/record-attr-check.bro @@ -0,0 +1,9 @@ +# @TEST-EXEC: bro --doc-scripts %INPUT + +type Tag: enum { + SOMETHING +}; + +type R: record { + field1: set[Tag] &default=set(); +};