CI: vtest: show coredumps if any
if any coredump is found, it is passed to gdb with 'thread apply all bt full'
This commit is contained in:
parent
ec38e1b39b
commit
9dd9289cec
26
.github/workflows/vtest.yml
vendored
26
.github/workflows/vtest.yml
vendored
@ -49,6 +49,13 @@ jobs:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 100
|
||||
|
||||
- name: Setup coredumps
|
||||
if: ${{ startsWith(matrix.os, 'ubuntu-') }}
|
||||
run: |
|
||||
sudo sysctl -w fs.suid_dumpable=1
|
||||
sudo sysctl kernel.core_pattern=/tmp/core.%h.%e.%t
|
||||
|
||||
#
|
||||
# Github Action cache key cannot contain comma, so we calculate it based on job name
|
||||
#
|
||||
@ -92,7 +99,8 @@ jobs:
|
||||
libpcre2-dev \
|
||||
libsystemd-dev \
|
||||
ninja-build \
|
||||
socat
|
||||
socat \
|
||||
gdb
|
||||
- name: Install brew dependencies
|
||||
if: ${{ startsWith(matrix.os, 'macos-') }}
|
||||
run: |
|
||||
@ -150,6 +158,7 @@ jobs:
|
||||
# This is required for macOS which does not actually allow to increase
|
||||
# the '-n' soft limit to the hard limit, thus failing to run.
|
||||
ulimit -n 65536
|
||||
ulimit -c unlimited
|
||||
make reg-tests HAPROXY_ARGS="-dI" VTEST_PROGRAM=../vtest/vtest REGTESTS_TYPES=default,bug,devel
|
||||
- name: Config syntax check memleak smoke testing
|
||||
if: ${{ contains(matrix.name, 'ASAN') }}
|
||||
@ -175,3 +184,18 @@ jobs:
|
||||
echo "::endgroup::"
|
||||
done
|
||||
exit 1
|
||||
|
||||
- name: Show coredumps
|
||||
if: ${{ failure() && steps.vtest.outcome == 'failure' }}
|
||||
run: |
|
||||
failed=false
|
||||
shopt -s nullglob
|
||||
for file in /tmp/core.*; do
|
||||
failed=true
|
||||
printf "::group::"
|
||||
gdb -ex 'thread apply all bt full' ./haproxy $file
|
||||
echo "::endgroup::"
|
||||
done
|
||||
if [ "$failed" = true ]; then
|
||||
exit 1;
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user