[lvm-devel] master - tests: utils.sh look for more coredump places
Zdenek Kabelac
zkabelac at sourceware.org
Mon Jul 17 11:41:13 UTC 2017
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=bd2a0fe2eca6cd60c0574bc3c2e590c886f5995b
Commit: bd2a0fe2eca6cd60c0574bc3c2e590c886f5995b
Parent: d15b9ac51003bee0c2fd65697e32e6726f5de773
Author: Zdenek Kabelac <zkabelac at redhat.com>
AuthorDate: Sun Jul 16 10:33:48 2017 +0200
Committer: Zdenek Kabelac <zkabelac at redhat.com>
CommitterDate: Mon Jul 17 12:33:42 2017 +0200
tests: utils.sh look for more coredump places
Quoting helps to anyone storing coredumps inside dir with spaces....
Also add default dir for coredumps with systemd coredumpctl.
---
test/lib/utils.sh | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/test/lib/utils.sh b/test/lib/utils.sh
index a0f325c..65bb1e6 100644
--- a/test/lib/utils.sh
+++ b/test/lib/utils.sh
@@ -143,13 +143,15 @@ STACKTRACE() {
# Check for all cores newer then TESTNAME file
# Assume users keep prefix 'core'
+ # TODO: possibly better integrate with coredumpctl & systemd
while IFS= read -r i; do
bin=$(gdb -batch -c "$i" 2>&1 | grep "generated by" | \
sed -e "s,.*generated by \`\([^ ']*\).*,\1,") || continue
echo "## Checking coredump: $i generated by $bin."
gdb -batch -c "$i" -x gdb_commands.txt "$(which "$bin")" 2>/dev/null | \
sed -e "s,^,## GDB: ," || continue
- done < <(find . $(dirname $(sysctl -n kernel.core_pattern)) -name 'core*' -newer TESTNAME 2>/dev/null || true)
+ done < <(find . "$(dirname "$(sysctl -n kernel.core_pattern)")" \
+ "/var/lib/systemd/coredump/" -name 'core*' -newer TESTNAME 2>/dev/null || true)
fi
test -f SKIP_THIS_TEST && exit 200
More information about the lvm-devel
mailing list