Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 2b5d437

Browse filesBrowse files
author
Alexander Korotkov
committed
Collect core dumps during checks and examine them for backtraces.
1 parent 88a9156 commit 2b5d437
Copy full SHA for 2b5d437

File tree

1 file changed

+11
-0
lines changed
Filter options

1 file changed

+11
-0
lines changed

‎travis/pg-travis-test.sh

Copy file name to clipboardExpand all lines: travis/pg-travis-test.sh
+11Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,10 @@ fi
6868
CLUSTER_PATH=$(pwd)/test_cluster
6969
$initdb_path -D $CLUSTER_PATH -U $USER -A trust
7070

71+
# enable core dumps and specify their path
72+
ulimit -c unlimited -S
73+
echo '/tmp/%e-%s-%p.core' | sudo tee /proc/sys/kernel/core_pattern
74+
7175
# build jsquery (using CFLAGS_SL for gcov)
7276
make USE_PGXS=1 PG_CONFIG=$config_path CFLAGS_SL="$($config_path --cflags_sl) -coverage"
7377
sudo make install USE_PGXS=1 PG_CONFIG=$config_path
@@ -89,6 +93,13 @@ PGPORT=55435 PGUSER=$USER PG_CONFIG=$config_path make installcheck USE_PGXS=1 ||
8993
# show diff if it exists
9094
if test -f regression.diffs; then cat regression.diffs; fi
9195

96+
# check core dumps if any
97+
for corefile in $(find /tmp/ -name '*.core' 2>/dev/null) ; do
98+
binary=$(gdb -quiet -core $corefile -batch -ex 'info auxv' | grep AT_EXECFN | perl -pe "s/^.*\"(.*)\"\$/\$1/g")
99+
echo dumping $corefile for $binary
100+
gdb --batch --quiet -ex "thread apply all bt full" -ex "quit" $binary $corefile
101+
done
102+
92103
#generate *.gcov files
93104
gcov *.c *.h
94105

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.