From 4ac65ce8ca3fd609ff4f11f2daf8c630d14e9b45 Mon Sep 17 00:00:00 2001 From: Arne Welzel Date: Thu, 2 Feb 2023 18:46:20 +0100 Subject: [PATCH] btest/decode_base_errors: Avoid binary output in baseline Zeek prints the input string verbatim to the terminal and that's upsetting btest just on Alpine. --- testing/btest/Baseline/bifs.decode_base64_errors/out | 4 ---- testing/btest/bifs/decode_base64_errors.zeek | 9 +++------ 2 files changed, 3 insertions(+), 10 deletions(-) diff --git a/testing/btest/Baseline/bifs.decode_base64_errors/out b/testing/btest/Baseline/bifs.decode_base64_errors/out index 6fd2476e2f..0bb47f6b5a 100644 --- a/testing/btest/Baseline/bifs.decode_base64_errors/out +++ b/testing/btest/Baseline/bifs.decode_base64_errors/out @@ -1,7 +1,3 @@ ### BTest baseline data generated by btest-diff. Do not edit. Use "btest -U/-u" to update. Requires BTest >= 0.63. error: character 94 ignored by Base64 decoding -error: error in decoding string ^#@!@##$!=== error: character 237 ignored by Base64 decoding -error: error in decoding string ноп=== -PASS -PASS diff --git a/testing/btest/bifs/decode_base64_errors.zeek b/testing/btest/bifs/decode_base64_errors.zeek index 0becccb09b..072506d555 100644 --- a/testing/btest/bifs/decode_base64_errors.zeek +++ b/testing/btest/bifs/decode_base64_errors.zeek @@ -1,11 +1,8 @@ # @TEST-EXEC: zeek -b %INPUT >out 2>&1 -# @TEST-EXEC: btest-diff out +# @TEST-EXEC: TEST_DIFF_CANONIFIER='grep character.*ignored' btest-diff out event zeek_init() { - local r1 = decode_base64("^#@!@##$!==="); - print |r1| > 0 ? "FAIL" : "PASS"; - - local r2 = decode_base64("\xed\xee\xef==="); - print |r2| > 0 ? "FAIL" : "PASS"; + decode_base64("^#@!@##$!==="); + decode_base64("\xed\xee\xef==="); }