diff --git a/testing/btest/broker/store/create-failure.zeek b/testing/btest/broker/store/create-failure.zeek index 57f56b815c..0b0e2fbca0 100644 --- a/testing/btest/broker/store/create-failure.zeek +++ b/testing/btest/broker/store/create-failure.zeek @@ -46,7 +46,7 @@ function check_terminate_conditions() function check_it(name: string, s: opaque of Broker::Store) { - when ( local r = Broker::keys(s) ) + when [name, s] ( local r = Broker::keys(s) ) { check_terminate_conditions(); print fmt("%s keys result: %s", name, r); diff --git a/testing/btest/broker/store/invalid-handle.zeek b/testing/btest/broker/store/invalid-handle.zeek index 3b270fa945..736962ba7b 100644 --- a/testing/btest/broker/store/invalid-handle.zeek +++ b/testing/btest/broker/store/invalid-handle.zeek @@ -8,7 +8,7 @@ function print_keys(a: any) { - when ( local s = Broker::keys(a) ) + when [a] ( local s = Broker::keys(a) ) { print "keys", s; } diff --git a/testing/btest/core/when-interpreter-exceptions.zeek b/testing/btest/core/when-interpreter-exceptions.zeek index d9d37e7318..36d63396bb 100644 --- a/testing/btest/core/when-interpreter-exceptions.zeek +++ b/testing/btest/core/when-interpreter-exceptions.zeek @@ -37,7 +37,7 @@ function f(do_exception: bool): bool local cmd = Exec::Command($cmd=fmt("echo 'f(%s)'", do_exception)); - return when ( local result = Exec::run(cmd) ) + return when [cmd, do_exception] ( local result = Exec::run(cmd) ) { print result$stdout; @@ -58,7 +58,7 @@ function g(do_exception: bool): bool { local stall = Exec::Command($cmd="sleep 30"); - return when ( local result = Exec::run(stall) ) + return when [do_exception, stall] ( local result = Exec::run(stall) ) { print "shouldn't get here, g()", do_exception, result; } @@ -84,14 +84,14 @@ event zeek_init() local cmd = Exec::Command($cmd="echo 'zeek_init()'"); local stall = Exec::Command($cmd="sleep 30"); - when ( local result = Exec::run(cmd) ) + when [cmd] ( local result = Exec::run(cmd) ) { print result$stdout; event termination_check(); print myrecord$notset; } - when ( local result2 = Exec::run(stall) ) + when [stall] ( local result2 = Exec::run(stall) ) { print "shouldn't get here", result2; check_term_condition(); diff --git a/testing/btest/scripts/base/frameworks/sumstats/on-demand.zeek b/testing/btest/scripts/base/frameworks/sumstats/on-demand.zeek index 208d9248f2..060552c0bd 100644 --- a/testing/btest/scripts/base/frameworks/sumstats/on-demand.zeek +++ b/testing/btest/scripts/base/frameworks/sumstats/on-demand.zeek @@ -22,7 +22,7 @@ redef exit_only_after_terminate=T; event on_demand_key() { local host = 1.2.3.4; - when ( local result = SumStats::request_key("test", [$host=host]) ) + when [host] ( local result = SumStats::request_key("test", [$host=host]) ) { print fmt("Key request for %s", host); print fmt(" Host: %s -> %.0f", host, result["test.reducer"]$sum); diff --git a/testing/btest/scripts/base/utils/active-http.test b/testing/btest/scripts/base/utils/active-http.test index b325bb40cc..d3fe3ebeac 100644 --- a/testing/btest/scripts/base/utils/active-http.test +++ b/testing/btest/scripts/base/utils/active-http.test @@ -23,7 +23,7 @@ function check_exit_condition() function test_request(label: string, req: ActiveHTTP::Request) { - when ( local response = ActiveHTTP::request(req) ) + when [label, req] ( local response = ActiveHTTP::request(req) ) { print label, response; check_exit_condition(); diff --git a/testing/btest/scripts/base/utils/exec.test b/testing/btest/scripts/base/utils/exec.test index 80a98c8285..7cf64908ae 100644 --- a/testing/btest/scripts/base/utils/exec.test +++ b/testing/btest/scripts/base/utils/exec.test @@ -19,7 +19,7 @@ function check_exit_condition() function test_cmd(label: string, cmd: Exec::Command) { - when ( local result = Exec::run(cmd) ) + when [label, cmd] ( local result = Exec::run(cmd) ) { local file_content = "";