@@ -113,7 +113,7 @@ if [ "${srcdir}" != "${builddir}" ]; then
113
113
cp -a " ${srcdir} /common" " ${builddir} "
114
114
fi
115
115
# Some tests require additional files to work for out-of-tree test runs.
116
- for file in ckdnsrps.sh conftest.py digcomp.pl ditch.pl fromhex.pl kasp.sh packet.pl pytest_custom_markers.py start.pl stop.pl testcrypto.sh; do
116
+ for file in ckdnsrps.sh conftest.py digcomp.pl ditch.pl fromhex.pl get_core_dumps.sh kasp.sh packet.pl pytest_custom_markers.py start.pl stop.pl testcrypto.sh; do
117
117
if [ ! -r " ${file} " ]; then
118
118
cp -a " ${srcdir} /${file} " " ${builddir} "
119
119
fi
@@ -265,51 +265,7 @@ else
265
265
exit $status
266
266
fi
267
267
268
- get_core_dumps () {
269
- find " $systest /" \( -name ' core' -or -name ' core.*' -or -name ' *.core' \) ! -name ' *.gz' ! -name ' *.txt' | sort
270
- }
271
-
272
- core_dumps=$( get_core_dumps | tr ' \n' ' ' )
273
- assertion_failures=$( find " $systest /" -name named.run -exec grep " assertion failure" {} + | wc -l)
274
- sanitizer_summaries=$( find " $systest /" -name ' tsan.*' | wc -l)
275
- if [ -n " $core_dumps " ]; then
276
- status=1
277
- echoinfo " I:$systest :Core dump(s) found: $core_dumps "
278
- get_core_dumps | while read -r coredump; do
279
- export SYSTESTDIR=" $systest "
280
- echoinfo " D:$systest :backtrace from $coredump :"
281
- echoinfo " D:$systest :--------------------------------------------------------------------------------"
282
- binary=$( gdb --batch --core=" $coredump " 2> /dev/null | sed -ne " s|Core was generated by \` \([^' ]*\)[' ].*|\1|p" )
283
- if [ ! -f " ${binary} " ]; then
284
- binary=$( find " ${top_builddir} " -path " */.libs/${binary} " -type f)
285
- fi
286
- " ${top_builddir} /libtool" --mode=execute gdb \
287
- -batch \
288
- -ex bt \
289
- -core=" $coredump " \
290
- -- \
291
- " $binary " 2> /dev/null | sed -n ' /^Core was generated by/,$p' | cat_d
292
- echoinfo " D:$systest :--------------------------------------------------------------------------------"
293
- coredump_backtrace=" ${coredump} -backtrace.txt"
294
- echoinfo " D:$systest :full backtrace from $coredump saved in $coredump_backtrace "
295
- " ${top_builddir} /libtool" --mode=execute gdb \
296
- -batch \
297
- -command=run.gdb \
298
- -core=" $coredump " \
299
- -- \
300
- " $binary " > " $coredump_backtrace " 2>&1
301
- echoinfo " D:$systest :core dump $coredump archived as $coredump .gz"
302
- gzip -1 " ${coredump} "
303
- done
304
- elif [ " $assertion_failures " -ne 0 ]; then
305
- status=1
306
- SYSTESTDIR=" $systest "
307
- echoinfo " I:$systest :$assertion_failures assertion failure(s) found"
308
- find " $systest /" -name ' tsan.*' -exec grep " SUMMARY: " {} + | sort -u | cat_d
309
- elif [ " $sanitizer_summaries " -ne 0 ]; then
310
- status=1
311
- echoinfo " I:$systest :$sanitizer_summaries sanitizer report(s) found"
312
- fi
268
+ $SHELL get_core_dumps.sh " $systest " || status=1
313
269
314
270
print_outstanding_files () {
315
271
if test -d ${srcdir} /../../../.git; then
0 commit comments