From e8872b4c7f618f52ffafa6018ada1f3f8633fa3b Mon Sep 17 00:00:00 2001 From: Evan Typanski Date: Wed, 2 Oct 2024 13:26:41 -0400 Subject: [PATCH] Fix input error test nondeterminism It seems like other similar tests get by because they have more "stuff" before they call `terminate()` most likely. But, to be safe, just removing the "received termination signal" line seems like the best approach. --- .../.stderrwithoutfirstline | 1 - .../base/frameworks/input/invalid-lines-duplicate.zeek | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/testing/btest/Baseline/scripts.base.frameworks.input.invalid-lines-duplicate/.stderrwithoutfirstline b/testing/btest/Baseline/scripts.base.frameworks.input.invalid-lines-duplicate/.stderrwithoutfirstline index 559a7eac60..cc8751673e 100644 --- a/testing/btest/Baseline/scripts.base.frameworks.input.invalid-lines-duplicate/.stderrwithoutfirstline +++ b/testing/btest/Baseline/scripts.base.frameworks.input.invalid-lines-duplicate/.stderrwithoutfirstline @@ -3,5 +3,4 @@ warning: ..<...>/Input::READER_ASCII: ../input.log, line 3: Not enough fields in warning: ..<...>/Input::READER_ASCII: ../input.log, line 9: Suppressed 5 warning(s) warning: ..<...>/Input::READER_ASCII: ../input.log, line 10: Not enough fields in line 'hello' of ../input.log. Found 0 fields, want positions 1 and -1 warning: ..<...>/Input::READER_ASCII: ../input.log, line 16: Suppressed 6 warning(s) -received termination signal >>> diff --git a/testing/btest/scripts/base/frameworks/input/invalid-lines-duplicate.zeek b/testing/btest/scripts/base/frameworks/input/invalid-lines-duplicate.zeek index fd54f4c2e6..160011a8e9 100644 --- a/testing/btest/scripts/base/frameworks/input/invalid-lines-duplicate.zeek +++ b/testing/btest/scripts/base/frameworks/input/invalid-lines-duplicate.zeek @@ -1,6 +1,6 @@ # @TEST-EXEC: btest-bg-run zeek zeek -b %INPUT # @TEST-EXEC: btest-bg-wait 10 -# @TEST-EXEC: sed 1d .stderr > .stderrwithoutfirstline +# @TEST-EXEC: sed -e 1d -e '/received termination/d' .stderr > .stderrwithoutfirstline # @TEST-EXEC: TEST_DIFF_CANONIFIER=$SCRIPTS/diff-remove-abspath btest-diff .stderrwithoutfirstline redef exit_only_after_terminate = T; @@ -46,5 +46,5 @@ event zeek_init() { event Input::end_of_data(name: string, source:string) { - terminate(); + terminate(); }