From a828e64b7d73a956dff422ee92d9f1db3935fad6 Mon Sep 17 00:00:00 2001 From: MarcoFalke <*~=`'#}+{/-|&$^_@721217.xyz> Date: Thu, 17 Jul 2025 13:00:05 +0200 Subject: [PATCH 1/5] test: Do not pass tests on unhandled exceptions This adds a missing catch for BaseException (e.g. SystemExit), which would otherwise be silently ignored. Also, remove the redundant other catches, which are just calling log.exception with a redundant log message. Github-Pull: #33001 Rebased-From: fa30b34026f76a5b8af997152fced2d281782e0d --- test/functional/test_framework/test_framework.py | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/test/functional/test_framework/test_framework.py b/test/functional/test_framework/test_framework.py index 49212eb0195..f3851c52b40 100755 --- a/test/functional/test_framework/test_framework.py +++ b/test/functional/test_framework/test_framework.py @@ -130,27 +130,18 @@ class BitcoinTestFramework(metaclass=BitcoinTestMetaClass): try: self.setup() self.run_test() - except JSONRPCException: - self.log.exception("JSONRPC error") - self.success = TestStatus.FAILED except SkipTest as e: self.log.warning("Test Skipped: %s" % e.message) self.success = TestStatus.SKIPPED - except AssertionError: - self.log.exception("Assertion failed") - self.success = TestStatus.FAILED - except KeyError: - self.log.exception("Key error") - self.success = TestStatus.FAILED except subprocess.CalledProcessError as e: self.log.exception("Called Process failed with '{}'".format(e.output)) self.success = TestStatus.FAILED - except Exception: - self.log.exception("Unexpected exception caught during testing") - self.success = TestStatus.FAILED except KeyboardInterrupt: self.log.warning("Exiting after keyboard interrupt") self.success = TestStatus.FAILED + except BaseException: + self.log.exception("Unexpected exception") + self.success = TestStatus.FAILED finally: exit_code = self.shutdown() sys.exit(exit_code) From 41fa1e0ee5693f9d666dc4bf2f56ae639613a048 Mon Sep 17 00:00:00 2001 From: MarcoFalke <*~=`'#}+{/-|&$^_@721217.xyz> Date: Fri, 18 Jul 2025 07:36:32 +0200 Subject: [PATCH 2/5] test: Log KeyboardInterrupt as exception log.exception is more verbose and useful to debug timeouts. Also, log stderr for CalledProcessError to make debugging easier. Github-Pull: #33001 Rebased-From: faa3e684118bffa7a98cf76eeeb59243219df900 --- test/functional/test_framework/test_framework.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/test/functional/test_framework/test_framework.py b/test/functional/test_framework/test_framework.py index f3851c52b40..29852c1f522 100755 --- a/test/functional/test_framework/test_framework.py +++ b/test/functional/test_framework/test_framework.py @@ -134,10 +134,7 @@ class BitcoinTestFramework(metaclass=BitcoinTestMetaClass): self.log.warning("Test Skipped: %s" % e.message) self.success = TestStatus.SKIPPED except subprocess.CalledProcessError as e: - self.log.exception("Called Process failed with '{}'".format(e.output)) - self.success = TestStatus.FAILED - except KeyboardInterrupt: - self.log.warning("Exiting after keyboard interrupt") + self.log.exception(f"Called Process failed with stdout='{e.stdout}'; stderr='{e.stderr}';") self.success = TestStatus.FAILED except BaseException: self.log.exception("Unexpected exception") From c09d82f0dddf14b92194c2f18bb8e8527fd84f52 Mon Sep 17 00:00:00 2001 From: Roman Zeyde Date: Sat, 26 Jul 2025 13:52:59 +0300 Subject: [PATCH 3/5] doc/zmq: fix unix socket path example Following https://github.com/bitcoin/bitcoin/blob/75a5c8258ec5309fe506438aa3815608430b53d6/doc/release-notes/release-notes-28.0.md?plain=1#L105 Github-Pull: #33070 Rebased-From: e83699a626b8a41c8fb9d0450e14e06a29a98bb8 --- doc/zmq.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/zmq.md b/doc/zmq.md index 07c340fb99e..1607dc7335b 100644 --- a/doc/zmq.md +++ b/doc/zmq.md @@ -85,7 +85,7 @@ For instance: $ bitcoind -zmqpubhashtx=tcp://127.0.0.1:28332 \ -zmqpubhashtx=tcp://192.168.1.2:28332 \ -zmqpubhashblock="tcp://[::1]:28333" \ - -zmqpubrawtx=ipc:///tmp/bitcoind.tx.raw \ + -zmqpubrawtx=unix:/tmp/bitcoind.tx.raw \ -zmqpubhashtxhwm=10000 Each PUB notification has a topic and body, where the header From 8782e6ce388968a3b9a99edf1a9e9775345865ae Mon Sep 17 00:00:00 2001 From: will Date: Sun, 27 Jul 2025 21:51:39 +0100 Subject: [PATCH 4/5] guix: warn SOURCE_DATE_EPOCH set in guix-codesign Currently there is a warning for this in guix-build, but we also need one in guix-codesign, otherwise the codesigned hashes are not reproducible. Move common functionality into prelude and call the function in both guix actions. Github-Pull: #33073 Rebased-From: 1bed0f734b3f2dd876193b5cad303bfab1d250d5 --- contrib/guix/guix-build | 14 +------------- contrib/guix/guix-codesign | 6 ++++++ contrib/guix/libexec/prelude.bash | 20 ++++++++++++++++++++ 3 files changed, 27 insertions(+), 13 deletions(-) diff --git a/contrib/guix/guix-build b/contrib/guix/guix-build index 715568c1543..ee285bf322c 100755 --- a/contrib/guix/guix-build +++ b/contrib/guix/guix-build @@ -73,19 +73,7 @@ mkdir -p "$VERSION_BASE" # SOURCE_DATE_EPOCH should not unintentionally be set ################ -if [ -n "$SOURCE_DATE_EPOCH" ] && [ -z "$FORCE_SOURCE_DATE_EPOCH" ]; then -cat << EOF -ERR: Environment variable SOURCE_DATE_EPOCH is set which may break reproducibility. - - Aborting... - -Hint: You may want to: - 1. Unset this variable: \`unset SOURCE_DATE_EPOCH\` before rebuilding - 2. Set the 'FORCE_SOURCE_DATE_EPOCH' environment variable if you insist on - using your own epoch -EOF -exit 1 -fi +check_source_date_epoch ################ # Build directories should not exist diff --git a/contrib/guix/guix-codesign b/contrib/guix/guix-codesign index dedee135b4a..ac7aae3a180 100755 --- a/contrib/guix/guix-codesign +++ b/contrib/guix/guix-codesign @@ -67,6 +67,12 @@ EOF exit 1 fi +################ +# SOURCE_DATE_EPOCH should not unintentionally be set +################ + +check_source_date_epoch + ################ # The codesignature git worktree should not be dirty ################ diff --git a/contrib/guix/libexec/prelude.bash b/contrib/guix/libexec/prelude.bash index 5039db63899..eb53a8fbd81 100644 --- a/contrib/guix/libexec/prelude.bash +++ b/contrib/guix/libexec/prelude.bash @@ -21,6 +21,26 @@ check_tools() { done } +################ +# SOURCE_DATE_EPOCH should not unintentionally be set +################ + +check_source_date_epoch() { + if [ -n "$SOURCE_DATE_EPOCH" ] && [ -z "$FORCE_SOURCE_DATE_EPOCH" ]; then + cat << EOF +ERR: Environment variable SOURCE_DATE_EPOCH is set which may break reproducibility. + + Aborting... + +Hint: You may want to: + 1. Unset this variable: \`unset SOURCE_DATE_EPOCH\` before rebuilding + 2. Set the 'FORCE_SOURCE_DATE_EPOCH' environment variable if you insist on + using your own epoch +EOF + exit 1 + fi +} + check_tools cat env readlink dirname basename git ################ From 4d145f9f20a333cbe22579db525292e956af66c9 Mon Sep 17 00:00:00 2001 From: fanquake Date: Mon, 28 Jul 2025 10:32:56 +0100 Subject: [PATCH 5/5] doc: update release notes for 28.x --- doc/release-notes.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/doc/release-notes.md b/doc/release-notes.md index 432f7cbf711..6a17306b329 100644 --- a/doc/release-notes.md +++ b/doc/release-notes.md @@ -40,16 +40,19 @@ Notable changes ### Test - #32765 test: Fix list index out of range error in feature_bip68_sequence.py +- #33001 test: Do not pass tests on unhandled exceptions ### Build - #32678 guix: warn and abort when SOURCE_DATE_EPOCH is set - #32943 depends: Force CMAKE_EXPORT_NO_PACKAGE_REGISTRY=TRUE +- #33073 guix: warn SOURCE_DATE_EPOCH set in guix-codesign ### Doc - #32776 doc: taproot became always active in v24.0 - #32777 doc: fix Transifex 404s +- #33070 doc/zmq: fix unix socket path example Credits @@ -58,6 +61,8 @@ Credits Thanks to everyone who directly contributed to this release: - fanquake - Hennadii Stepanov +- MarcoFalke +- romanz - Sjors Provoost - willcl-ark - zaidmstrr