diff --git a/testing/btest/Baseline.cpp/bifs.disable_analyzer-hook/out b/testing/btest/Baseline.cpp/bifs.disable_analyzer-hook/out new file mode 100644 index 0000000000..c72bc161e8 --- /dev/null +++ b/testing/btest/Baseline.cpp/bifs.disable_analyzer-hook/out @@ -0,0 +1,16 @@ +### BTest baseline data generated by btest-diff. Do not edit. Use "btest -U/-u" to update. Requires BTest >= 0.63. +proto confirm, AllAnalyzers::ANALYZER_ANALYZER_HTTP +http_request, GET, /style/enhanced.css +preventing disable_analyzer, [orig_h=192.168.1.104, orig_p=1673/tcp, resp_h=63.245.209.11, resp_p=80/tcp], AllAnalyzers::ANALYZER_ANALYZER_HTTP, 3, 1 +F +http_reply, 200 +http_request, GET, /script/urchin.js +preventing disable_analyzer, [orig_h=192.168.1.104, orig_p=1673/tcp, resp_h=63.245.209.11, resp_p=80/tcp], AllAnalyzers::ANALYZER_ANALYZER_HTTP, 3, 3 +F +http_reply, 200 +http_request, GET, /images/template/screen/bullet_utility.png +allowing disable_analyzer, [orig_h=192.168.1.104, orig_p=1673/tcp, resp_h=63.245.209.11, resp_p=80/tcp], AllAnalyzers::ANALYZER_ANALYZER_HTTP, 3, 5 +T +total http messages, { +[[orig_h=192.168.1.104, orig_p=1673/tcp, resp_h=63.245.209.11, resp_p=80/tcp]] = 5 +} diff --git a/testing/btest/Baseline.cpp/bifs.string_utils_errors/.stderr b/testing/btest/Baseline.cpp/bifs.string_utils_errors/.stderr new file mode 100644 index 0000000000..473c5df38b --- /dev/null +++ b/testing/btest/Baseline.cpp/bifs.string_utils_errors/.stderr @@ -0,0 +1,6 @@ +### BTest baseline data generated by btest-diff. Do not edit. Use "btest -U/-u" to update. Requires BTest >= 0.63. +error: Fill string passed to ljust() must be a single character +error: Fill string passed to rjust() must be a single character +error: find_str: end position must be greater than start position +error: find_str: end position must be greater than start position +error: string_cat() requires string arguments diff --git a/testing/btest/Baseline.cpp/language.vector-coerce-expr2/error b/testing/btest/Baseline.cpp/language.vector-coerce-expr2/error new file mode 100644 index 0000000000..3d4aeda605 --- /dev/null +++ b/testing/btest/Baseline.cpp/language.vector-coerce-expr2/error @@ -0,0 +1,2 @@ +### BTest baseline data generated by btest-diff. Do not edit. Use "btest -U/-u" to update. Requires BTest >= 0.63. +runtime error in compiled code: overflow promoting from unsigned/double to signed arithmetic value diff --git a/testing/btest/Baseline.cpp/language.vector-coerce-expr2/output b/testing/btest/Baseline.cpp/language.vector-coerce-expr2/output new file mode 100644 index 0000000000..b92f1ee707 --- /dev/null +++ b/testing/btest/Baseline.cpp/language.vector-coerce-expr2/output @@ -0,0 +1,4 @@ +### BTest baseline data generated by btest-diff. Do not edit. Use "btest -U/-u" to update. Requires BTest >= 0.63. +[5.5, 5.2, -3.9, 20.0] +[11, 5, , 107, , , 1046] +[-2, -4, , -7, , -18, -999] diff --git a/testing/btest/Baseline.cpp/scripts.base.protocols.ssl.prevent-disable-analyzer/.stdout b/testing/btest/Baseline.cpp/scripts.base.protocols.ssl.prevent-disable-analyzer/.stdout new file mode 100644 index 0000000000..229c675729 --- /dev/null +++ b/testing/btest/Baseline.cpp/scripts.base.protocols.ssl.prevent-disable-analyzer/.stdout @@ -0,0 +1,11 @@ +### BTest baseline data generated by btest-diff. Do not edit. Use "btest -U/-u" to update. Requires BTest >= 0.63. +analyzer_confirmation, [orig_h=10.0.0.80, orig_p=56637/tcp, resp_h=68.233.76.12, resp_p=443/tcp], AllAnalyzers::ANALYZER_ANALYZER_SSL, 3 +encrypted_data, [orig_h=10.0.0.80, orig_p=56637/tcp, resp_h=68.233.76.12, resp_p=443/tcp], T, 22, 32, 1 +established, [orig_h=10.0.0.80, orig_p=56637/tcp, resp_h=68.233.76.12, resp_p=443/tcp] +disabling_analyzer, [orig_h=10.0.0.80, orig_p=56637/tcp, resp_h=68.233.76.12, resp_p=443/tcp], AllAnalyzers::ANALYZER_ANALYZER_SSL, 3 +preventing disabling_analyzer, [orig_h=10.0.0.80, orig_p=56637/tcp, resp_h=68.233.76.12, resp_p=443/tcp], AllAnalyzers::ANALYZER_ANALYZER_SSL, 3 +encrypted_data, [orig_h=10.0.0.80, orig_p=56637/tcp, resp_h=68.233.76.12, resp_p=443/tcp], F, 22, 32, 2 +encrypted_data, [orig_h=10.0.0.80, orig_p=56637/tcp, resp_h=68.233.76.12, resp_p=443/tcp], T, 23, 31, 3 +encrypted_data, [orig_h=10.0.0.80, orig_p=56637/tcp, resp_h=68.233.76.12, resp_p=443/tcp], T, 23, 17, 4 +disabling_analyzer, [orig_h=10.0.0.80, orig_p=56637/tcp, resp_h=68.233.76.12, resp_p=443/tcp], AllAnalyzers::ANALYZER_ANALYZER_SSL, 3 +allowing disabling_analyzer, [orig_h=10.0.0.80, orig_p=56637/tcp, resp_h=68.233.76.12, resp_p=443/tcp], AllAnalyzers::ANALYZER_ANALYZER_SSL, 3 diff --git a/testing/btest/Baseline/language.int-min-max/out b/testing/btest/Baseline/language.int-min-max/out new file mode 100644 index 0000000000..b58f15c0de --- /dev/null +++ b/testing/btest/Baseline/language.int-min-max/out @@ -0,0 +1,5 @@ +### BTest baseline data generated by btest-diff. Do not edit. Use "btest -U/-u" to update. Requires BTest >= 0.63. +max int value = 9223372036854775807 (PASS) +min int value = -9223372036854775808 (PASS) +max int value = 9223372036854775807 (PASS) +min int value = -9223372036854775808 (PASS) diff --git a/testing/btest/language/int-min-max.zeek b/testing/btest/language/int-min-max.zeek new file mode 100644 index 0000000000..92bc0884fd --- /dev/null +++ b/testing/btest/language/int-min-max.zeek @@ -0,0 +1,32 @@ +# Don't run for C++ script compilation, as the C++ compiler itself complains +# about the constants. +# @TEST-REQUIRES: test "${ZEEK_USE_CPP}" != "1" +# @TEST-EXEC: zeek -b %INPUT >out +# @TEST-EXEC: btest-diff out +# @TEST-EXEC: btest-diff .stderr + +function test_case(msg: string, expect: bool) + { + print fmt("%s (%s)", msg, expect ? "PASS" : "FAIL"); + } + +global i1: int = 9223372036854775807; # max. allowed value +global i2: int = -9223372036854775808; # min. allowed value +global i3: int = 0x7fffffffffffffff; # max. allowed value +global i4: int = -0x8000000000000000; # min. allowed value + +event zeek_init() +{ + # Max/min value tests. We do these separately from language/int.zeek + # because they generate compile-time errors for scripts compiled to + # C++. + + local str1 = fmt("max int value = %d", i1); + test_case( str1, str1 == "max int value = 9223372036854775807" ); + local str2 = fmt("min int value = %d", i2); + test_case( str2, str2 == "min int value = -9223372036854775808" ); + local str3 = fmt("max int value = %d", i3); + test_case( str3, str3 == "max int value = 9223372036854775807" ); + local str4 = fmt("min int value = %d", i4); + test_case( str4, str4 == "min int value = -9223372036854775808" ); +}