diff --git a/CHANGES b/CHANGES index 35c7df16de..d380aabc4e 100644 --- a/CHANGES +++ b/CHANGES @@ -1,4 +1,8 @@ +3.2.0-dev.46 | 2020-02-14 22:02:50 -0800 + + * Fix code format of various reporter btests (Jon Siwek, Corelight) + 3.2.0-dev.45 | 2020-02-14 21:14:49 -0800 * Update libkqueue for a linux bugfix (Jon Siwek, Corelight) diff --git a/VERSION b/VERSION index 41b8c8d019..5972b3e517 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -3.2.0-dev.45 +3.2.0-dev.46 diff --git a/testing/btest/core/reporter-error-in-handler.zeek b/testing/btest/core/reporter-error-in-handler.zeek index 3ec9eac280..2de37a225c 100644 --- a/testing/btest/core/reporter-error-in-handler.zeek +++ b/testing/btest/core/reporter-error-in-handler.zeek @@ -3,7 +3,7 @@ # than looping indefinitly, the error inside the handler should reported to stderr. # # TODO: interpreter exceptions currently may cause memory leaks, so disable leak checks -# @TEST-EXEC: ASAN_OPTIONS="$ASAN_OPTIONS,detect_leaks=0" zeek %INPUT >output 2>&1 +# @TEST-EXEC: ASAN_OPTIONS="$ASAN_OPTIONS,detect_leaks=0" zeek -b %INPUT >output 2>&1 # @TEST-EXEC: TEST_DIFF_CANONIFIER=$SCRIPTS/diff-remove-abspath btest-diff output global a: table[count] of count; @@ -11,20 +11,20 @@ global a: table[count] of count; global c = 0; event reporter_error(t: time, msg: string, location: string) -{ - c += 1; + { + c += 1; - if ( c > 1 ) - print "FAILED: 2nd error reported to script as well."; - - else - { - print "1st error printed on script level"; - print a[2]; - } -} + if ( c > 1 ) + print "FAILED: 2nd error reported to script as well."; + + else + { + print "1st error printed on script level"; + print a[2]; + } + } event zeek_init() -{ - print a[1]; -} + { + print a[1]; + } diff --git a/testing/btest/core/reporter-fmt-strings.zeek b/testing/btest/core/reporter-fmt-strings.zeek index 087b0e2244..1bf739dd71 100644 --- a/testing/btest/core/reporter-fmt-strings.zeek +++ b/testing/btest/core/reporter-fmt-strings.zeek @@ -1,10 +1,10 @@ # The format string below should end up as a literal part of the reporter's # error message to stderr and shouldn't be replaced internally. # -# @TEST-EXEC-FAIL: zeek %INPUT >output 2>&1 +# @TEST-EXEC-FAIL: zeek -b %INPUT >output 2>&1 # @TEST-EXEC: TEST_DIFF_CANONIFIER=$SCRIPTS/diff-remove-abspath btest-diff output event zeek_init() -{ - event dont_interpret_this("%s"); -} + { + event dont_interpret_this("%s"); + } diff --git a/testing/btest/core/reporter-parse-error.zeek b/testing/btest/core/reporter-parse-error.zeek index dfd9ed6d02..219404d4f2 100644 --- a/testing/btest/core/reporter-parse-error.zeek +++ b/testing/btest/core/reporter-parse-error.zeek @@ -1,8 +1,8 @@ # -# @TEST-EXEC-FAIL: zeek %INPUT >output 2>&1 +# @TEST-EXEC-FAIL: zeek -b %INPUT >output 2>&1 # @TEST-EXEC: TEST_DIFF_CANONIFIER=$SCRIPTS/diff-remove-abspath btest-diff output event zeek_init() -{ - print TESTFAILURE; -} + { + print TESTFAILURE; + } diff --git a/testing/btest/core/reporter-runtime-error.zeek b/testing/btest/core/reporter-runtime-error.zeek index 63e0437e26..0e5ba160df 100644 --- a/testing/btest/core/reporter-runtime-error.zeek +++ b/testing/btest/core/reporter-runtime-error.zeek @@ -1,13 +1,13 @@ # -# @TEST-EXEC-FAIL: zeek %INPUT >output 2>&1 +# @TEST-EXEC-FAIL: zeek -b %INPUT >output 2>&1 # @TEST-EXEC: TEST_DIFF_CANONIFIER=$SCRIPTS/diff-remove-abspath btest-diff output global a: table[count] of count; event zeek_init() -{ - print a[2]; -} + { + print a[2]; + } print a[1]; diff --git a/testing/btest/core/reporter-type-mismatch.zeek b/testing/btest/core/reporter-type-mismatch.zeek index 0fc8d78f6f..3c0f5db057 100644 --- a/testing/btest/core/reporter-type-mismatch.zeek +++ b/testing/btest/core/reporter-type-mismatch.zeek @@ -1,12 +1,12 @@ # -# @TEST-EXEC-FAIL: zeek %INPUT >output 2>&1 +# @TEST-EXEC-FAIL: zeek -b %INPUT >output 2>&1 # @TEST-EXEC: TEST_DIFF_CANONIFIER=$SCRIPTS/diff-remove-abspath btest-diff output event foo(a: string) -{ -} + { + } event zeek_init() -{ - event foo(42); -} + { + event foo(42); + } diff --git a/testing/btest/core/reporter.zeek b/testing/btest/core/reporter.zeek index 6ab4f18b71..39b263d2f7 100644 --- a/testing/btest/core/reporter.zeek +++ b/testing/btest/core/reporter.zeek @@ -4,50 +4,50 @@ # @TEST-EXEC: TEST_DIFF_CANONIFIER="$SCRIPTS/diff-remove-abspath | $SCRIPTS/diff-remove-timestamps" btest-diff logger-test.log event zeek_init() -{ - Reporter::info("init test-info"); - Reporter::warning("init test-warning"); - Reporter::error("init test-error"); -} + { + Reporter::info("init test-info"); + Reporter::warning("init test-warning"); + Reporter::error("init test-error"); + } event zeek_done() -{ - Reporter::info("done test-info"); - Reporter::warning("done test-warning"); - Reporter::error("done test-error"); -} + { + Reporter::info("done test-info"); + Reporter::warning("done test-warning"); + Reporter::error("done test-error"); + } global first = 1; event connection_established(c: connection) -{ - if ( ! first ) - return; + { + if ( ! first ) + return; - print "established"; - - Reporter::info("processing test-info"); - Reporter::warning("processing test-warning"); - Reporter::error("processing test-error"); - first = 0; -} + print "established"; + + Reporter::info("processing test-info"); + Reporter::warning("processing test-warning"); + Reporter::error("processing test-error"); + first = 0; + } global f = open("logger-test.log"); event reporter_info(t: time, msg: string, location: string) { - print f, fmt("reporter_info|%s|%s|%.6f", msg, location, t); - } + print f, fmt("reporter_info|%s|%s|%.6f", msg, location, t); + } event reporter_warning(t: time, msg: string, location: string) { - print f, fmt("reporter_warning|%s|%s|%.6f", msg, location, t); - } + print f, fmt("reporter_warning|%s|%s|%.6f", msg, location, t); + } event reporter_error(t: time, msg: string, location: string) { - print f, fmt("reporter_error|%s|%s|%.6f", msg, location, t); - } + print f, fmt("reporter_error|%s|%s|%.6f", msg, location, t); + } Reporter::info("pre test-info"); Reporter::warning("pre test-warning");