From a15bdf4efb41d35e4b2f1625dc25dc93162f4dc9 Mon Sep 17 00:00:00 2001 From: GarmashAlex Date: Fri, 28 Feb 2025 23:24:11 +0300 Subject: [PATCH 1/2] Update test_runner.py --- test/util/test_runner.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/test/util/test_runner.py b/test/util/test_runner.py index cac184ca302..ce75470f88e 100755 --- a/test/util/test_runner.py +++ b/test/util/test_runner.py @@ -164,6 +164,11 @@ def bctest(testDir, testObj, buildenv): if want_error not in res.stderr: logging.error(f"Error mismatch:\nExpected: {want_error}\nReceived: {res.stderr.rstrip()}\nres: {str(res)}") raise Exception + else: + # If no error is expected, stderr should be empty except for known cases + if res.stderr and not (testObj.get("exec") == "./bitcoin-tx" and "wine" in os.environ.get("WINEPREFIX", "")): + logging.error(f"Unexpected stderr output when no error expected:\n{res.stderr.rstrip()}\nres: {str(res)}") + raise Exception def parse_output(a, fmt): """Parse the output according to specified format. From c64c5313885af6a39a446749e059bc7dc6464c57 Mon Sep 17 00:00:00 2001 From: GarmashAlex Date: Tue, 11 Mar 2025 20:27:36 +0300 Subject: [PATCH 2/2] Update test_runner.py --- test/util/test_runner.py | 1 - 1 file changed, 1 deletion(-) diff --git a/test/util/test_runner.py b/test/util/test_runner.py index ce75470f88e..e8c42e16b79 100755 --- a/test/util/test_runner.py +++ b/test/util/test_runner.py @@ -156,7 +156,6 @@ def bctest(testDir, testObj, buildenv): if "error_txt" in testObj: want_error = testObj["error_txt"] # Compare error text - # TODO: ideally, we'd compare the strings exactly and also assert # That stderr is empty if no errors are expected. However, bitcoin-tx # emits DISPLAY errors when running as a windows application on # linux through wine. Just assert that the expected error text appears