summaryrefslogtreecommitdiffstats
path: root/tests/backtrace-subr.sh
diff options
context:
space:
mode:
authorMark Wielaard <[email protected]>2013-12-13 22:42:46 +0100
committerMark Wielaard <[email protected]>2013-12-13 22:57:30 +0100
commit7fc4929958ca78bd7b268014e9029d5ae1608822 (patch)
tree3139dd1c55f84c09fbff01b5318b8f21dabe4d6b /tests/backtrace-subr.sh
parentb47e28a743afef4cd02fbe753c1526ed89c472c9 (diff)
tests: Disable valgrind for core dumping and for self-introspecting tests.
The only tests that fork and exec are those that will then try to ptrace attach the child for unwind testing. That won't work when the child is also running under valgrind. So remove --trace-children=yes. Also disable valgrind while dumping a core or for tests that try to inspect their own state. They will get confused otherwise finding pieces of valgrind in their maps. Note we still seem to hit the following valgrind bug because the way we map and unmap some shared libraries gets valgrind confused: https://bugs.kde.org/show_bug.cgi?id=327427 Signed-off-by: Mark Wielaard <[email protected]>
Diffstat (limited to 'tests/backtrace-subr.sh')
-rw-r--r--tests/backtrace-subr.sh11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/backtrace-subr.sh b/tests/backtrace-subr.sh
index 39d40b3f..580a1cea 100644
--- a/tests/backtrace-subr.sh
+++ b/tests/backtrace-subr.sh
@@ -104,7 +104,18 @@ check_native()
check_native_core()
{
child=$1
+
+ # Disable valgrind while dumping core.
+ SAVED_VALGRIND_CMD="$VALGRIND_CMD"
+ unset VALGRIND_CMD
+
core="core.`ulimit -c unlimited; set +ex; testrun ${abs_builddir}/$child --gencore; true`"
+
+ if [ "x$SAVED_VALGRIND_CMD" != "x" ]; then
+ VALGRIND_CMD="$SAVED_VALGRIND_CMD"
+ export VALGRIND_CMD
+ fi
+
# Do not abort on non-zero exit code due to some warnings of ./backtrace
# - see function check_err.
tempfiles $core{,.{bt,err}}