From ad7769bf9e7be38cf2b9669312a3e31dcff99bc9 Mon Sep 17 00:00:00 2001 From: Kittywhiskers Van Gogh <63189531+kwvg@users.noreply.github.com> Date: Thu, 10 Aug 2023 17:55:33 -0300 Subject: [PATCH] merge bitcoin#28253: display abrupt shutdown errors in console output --- test/functional/test_framework/test_node.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/test/functional/test_framework/test_node.py b/test/functional/test_framework/test_node.py index 1d91415ea8bd5..113175e313cfe 100755 --- a/test/functional/test_framework/test_node.py +++ b/test/functional/test_framework/test_node.py @@ -259,8 +259,13 @@ def wait_for_rpc_connection(self): poll_per_s = 4 for _ in range(poll_per_s * self.rpc_timeout): if self.process.poll() is not None: + # Attach abrupt shutdown error/s to the exception message + self.stderr.seek(0) + str_error = ''.join(line.decode('utf-8') for line in self.stderr) + str_error += "************************\n" if str_error else '' + raise FailedToStartError(self._node_msg( - 'dashd exited with status {} during initialization'.format(self.process.returncode))) + f'dashd exited with status {self.process.returncode} during initialization. {str_error}')) try: rpc = get_rpc_proxy( rpc_url(self.datadir, self.index, self.chain, self.rpchost),