aboutsummaryrefslogtreecommitdiff
path: root/test/functional/p2p_invalid_messages.py
diff options
context:
space:
mode:
authorMarcoFalke <falke.marco@gmail.com>2018-11-27 16:30:32 -0500
committerMarcoFalke <falke.marco@gmail.com>2018-11-27 16:30:39 -0500
commit600b85bb417295f4d9c7d5b9fd8502f3c8f113e3 (patch)
tree08972900a4295e63e16f43715058e5ff47698b1e /test/functional/p2p_invalid_messages.py
parentfdf146f3293c487afdc4d6d9f6b64099aa8bd28a (diff)
parent6541d59ddc2b1b475187e6cbe76a50ee6e85b421 (diff)
Merge #14794: tests: Add AddressSanitizer (ASan) Travis build
6541d59ddc Add LSan suppression warnings (practicalswift) ff7212ec32 Add ASan Travis build (practicalswift) ebd3bf2590 Make test p2p_invalid_messages.py pass: Allow for expected Travis ASAN memory increase (practicalswift) Pull request description: Add ASan Travis build. Tree-SHA512: b9712aaf0c9112b637b6ef0c5d93961863dcbecaf31d9561eb09258a61540fb31d2c8ecae86518a82763279e4aa6cac266cd352c2b2507df0335c0199f8b3d78
Diffstat (limited to 'test/functional/p2p_invalid_messages.py')
-rwxr-xr-xtest/functional/p2p_invalid_messages.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/test/functional/p2p_invalid_messages.py b/test/functional/p2p_invalid_messages.py
index 3ee67980a4..65997a5f9d 100755
--- a/test/functional/p2p_invalid_messages.py
+++ b/test/functional/p2p_invalid_messages.py
@@ -3,6 +3,7 @@
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test node responses to invalid network messages."""
+import os
import struct
from test_framework import messages
@@ -66,7 +67,10 @@ class InvalidMessagesTest(BitcoinTestFramework):
msg_at_size = msg_unrecognized("b" * valid_data_limit)
assert len(msg_at_size.serialize()) == msg_limit
- with node.assert_memory_usage_stable(increase_allowed=0.5):
+ increase_allowed = 0.5
+ if [s for s in os.environ.get("BITCOIN_CONFIG", "").split(" ") if "--with-sanitizers" in s and "address" in s]:
+ increase_allowed = 3.5
+ with node.assert_memory_usage_stable(increase_allowed=increase_allowed):
self.log.info(
"Sending a bunch of large, junk messages to test "
"memory exhaustion. May take a bit...")