mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-06-12 07:39:41 +02:00
test: Catch CalledProcessError to support --usecli in feature_dbcrash.py
This commit is contained in:
@@ -28,6 +28,7 @@
|
|||||||
import errno
|
import errno
|
||||||
import http.client
|
import http.client
|
||||||
import random
|
import random
|
||||||
|
import subprocess
|
||||||
import time
|
import time
|
||||||
|
|
||||||
from test_framework.blocktools import COINBASE_MATURITY
|
from test_framework.blocktools import COINBASE_MATURITY
|
||||||
@@ -49,7 +50,6 @@ class ChainstateWriteCrashTest(BitcoinTestFramework):
|
|||||||
def set_test_params(self):
|
def set_test_params(self):
|
||||||
self.num_nodes = 4
|
self.num_nodes = 4
|
||||||
self.rpc_timeout = 480
|
self.rpc_timeout = 480
|
||||||
self.supports_cli = False
|
|
||||||
|
|
||||||
# Set -maxmempool=0 to turn off mempool memory sharing with dbcache
|
# Set -maxmempool=0 to turn off mempool memory sharing with dbcache
|
||||||
self.base_args = [
|
self.base_args = [
|
||||||
@@ -113,6 +113,9 @@ class ChainstateWriteCrashTest(BitcoinTestFramework):
|
|||||||
except (http.client.CannotSendRequest, http.client.RemoteDisconnected) as e:
|
except (http.client.CannotSendRequest, http.client.RemoteDisconnected) as e:
|
||||||
self.log.debug(f"node {node_index} submitblock raised exception: {e}")
|
self.log.debug(f"node {node_index} submitblock raised exception: {e}")
|
||||||
return False
|
return False
|
||||||
|
except subprocess.CalledProcessError as e:
|
||||||
|
self.log.debug(f"node {node_index} submitblock raised CalledProcessError: {e}")
|
||||||
|
return False
|
||||||
except OSError as e:
|
except OSError as e:
|
||||||
self.log.debug(f"node {node_index} submitblock raised OSError exception: errno={e.errno}")
|
self.log.debug(f"node {node_index} submitblock raised OSError exception: errno={e.errno}")
|
||||||
if e.errno in [errno.EPIPE, errno.ECONNREFUSED, errno.ECONNRESET]:
|
if e.errno in [errno.EPIPE, errno.ECONNREFUSED, errno.ECONNRESET]:
|
||||||
|
|||||||
Reference in New Issue
Block a user