summaryrefslogtreecommitdiffstats
path: root/test/util.py
diff options
context:
space:
mode:
Diffstat (limited to 'test/util.py')
-rw-r--r--test/util.py15
1 files changed, 15 insertions, 0 deletions
diff --git a/test/util.py b/test/util.py
index 7d973bde237..65e25f77f0c 100644
--- a/test/util.py
+++ b/test/util.py
@@ -70,6 +70,21 @@ def ip6_normalize(ip6):
socket.inet_pton(socket.AF_INET6, ip6))
+def check_core_path(logger, core_path):
+ with open("/proc/sys/kernel/core_pattern", "r") as f:
+ corefmt = f.read()
+ if corefmt.startswith("|"):
+ logger.error(
+ "WARNING: redirecting the core dump through a"
+ " filter may result in truncated dumps.")
+ logger.error(
+ " You may want to check the filter settings"
+ " or uninstall it and edit the"
+ " /proc/sys/kernel/core_pattern accordingly.")
+ logger.error(
+ " current core pattern is: %s" % corefmt)
+
+
class NumericConstant(object):
__metaclass__ = ABCMeta