mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-08-06 23:27:04 +02:00
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
|
- uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
fetch-depth: 100
|
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
|
# Github Action cache key cannot contain comma, so we calculate it based on job name
|
||||||
#
|
#
|
||||||
@ -92,7 +99,8 @@ jobs:
|
|||||||
libpcre2-dev \
|
libpcre2-dev \
|
||||||
libsystemd-dev \
|
libsystemd-dev \
|
||||||
ninja-build \
|
ninja-build \
|
||||||
socat
|
socat \
|
||||||
|
gdb
|
||||||
- name: Install brew dependencies
|
- name: Install brew dependencies
|
||||||
if: ${{ startsWith(matrix.os, 'macos-') }}
|
if: ${{ startsWith(matrix.os, 'macos-') }}
|
||||||
run: |
|
run: |
|
||||||
@ -150,6 +158,7 @@ jobs:
|
|||||||
# This is required for macOS which does not actually allow to increase
|
# This is required for macOS which does not actually allow to increase
|
||||||
# the '-n' soft limit to the hard limit, thus failing to run.
|
# the '-n' soft limit to the hard limit, thus failing to run.
|
||||||
ulimit -n 65536
|
ulimit -n 65536
|
||||||
|
ulimit -c unlimited
|
||||||
make reg-tests HAPROXY_ARGS="-dI" VTEST_PROGRAM=../vtest/vtest REGTESTS_TYPES=default,bug,devel
|
make reg-tests HAPROXY_ARGS="-dI" VTEST_PROGRAM=../vtest/vtest REGTESTS_TYPES=default,bug,devel
|
||||||
- name: Config syntax check memleak smoke testing
|
- name: Config syntax check memleak smoke testing
|
||||||
if: ${{ contains(matrix.name, 'ASAN') }}
|
if: ${{ contains(matrix.name, 'ASAN') }}
|
||||||
@ -175,3 +184,18 @@ jobs:
|
|||||||
echo "::endgroup::"
|
echo "::endgroup::"
|
||||||
done
|
done
|
||||||
exit 1
|
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