aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpracticalswift <practicalswift@users.noreply.github.com>2018-11-25 21:23:30 +0100
committerpracticalswift <practicalswift@users.noreply.github.com>2018-11-26 22:20:46 +0100
commitebd3bf25909cb20dc1224872be3017397579ff0f (patch)
treeadaa976202dae9d3e233d79914f7b9c02937d31f
parenta4eaaa6ac53606a1533b56050af77961d8c27dc7 (diff)
Make test p2p_invalid_messages.py pass: Allow for expected Travis ASAN memory increase
-rwxr-xr-x.travis/test_04_install.sh2
-rwxr-xr-xtest/functional/p2p_invalid_messages.py6
2 files changed, 6 insertions, 2 deletions
diff --git a/.travis/test_04_install.sh b/.travis/test_04_install.sh
index 75de71c583..94d9ccb32d 100755
--- a/.travis/test_04_install.sh
+++ b/.travis/test_04_install.sh
@@ -9,7 +9,7 @@ export LC_ALL=C.UTF-8
travis_retry docker pull "$DOCKER_NAME_TAG"
export TSAN_OPTIONS="suppressions=${TRAVIS_BUILD_DIR}/test/sanitizer_suppressions/tsan"
export UBSAN_OPTIONS="suppressions=${TRAVIS_BUILD_DIR}/test/sanitizer_suppressions/ubsan:print_stacktrace=1:halt_on_error=1"
-env | grep -E '^(CCACHE_|WINEDEBUG|LC_ALL|BOOST_TEST_RANDOM|CONFIG_SHELL|(TSAN|UBSAN)_OPTIONS)' | tee /tmp/env
+env | grep -E '^(BITCOIN_CONFIG|CCACHE_|WINEDEBUG|LC_ALL|BOOST_TEST_RANDOM|CONFIG_SHELL|(TSAN|UBSAN)_OPTIONS)' | tee /tmp/env
if [[ $HOST = *-mingw32 ]]; then
DOCKER_ADMIN="--cap-add SYS_ADMIN"
fi
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...")