1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-01-03 05:18:29 +03:00

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.
This commit is contained in:
Zdenek Kabelac 2017-07-16 10:33:48 +02:00
parent d15b9ac510
commit bd2a0fe2ec

View File

@ -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