Skip to content

Commit

Permalink
ci(gha): coredump before cleanup
Browse files Browse the repository at this point in the history
List all coredumps since start of testing.
Ensure unlimited coredump.
Run coredump check before cleaning the workspace. This is helpful in
case there was a coredump from our own binaries.
Also disable the man-pages auto-update.

Signed-off-by: Tiago Castro <[email protected]>
  • Loading branch information
tiagolobocastro committed Feb 12, 2025
1 parent 0b5cb5d commit 30e0ead
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
11 changes: 7 additions & 4 deletions .github/workflows/unit-int.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ jobs:
- name: Setup Test Pre-Requisites
run: |
sudo sysctl -w vm.nr_hugepages=3584
sudo debconf-communicate <<< "set man-db/auto-update false" || true
sudo dpkg-reconfigure man-db || true
ulimit -c unlimited
sudo apt-get update
sudo apt-get install linux-modules-extra-$(uname -r)
for module in nvme_tcp nbd nvme_rdma; do
Expand All @@ -41,11 +44,11 @@ jobs:
run: |
echo "TEST_START_DATE=$(date +"%Y-%m-%d %H:%M:%S")" >> $GITHUB_ENV
nix-shell --run "./scripts/cargo-test.sh"
- name: Check Coredumps
run: sudo ./scripts/check-coredumps.sh --since "${TEST_START_DATE}"
- name: Cleanup
if: always()
run: nix-shell --run "./scripts/clean-cargo-tests.sh"
- name: Check Coredumps
run: sudo ./scripts/check-coredumps.sh --since "${TEST_START_DATE}"
- name: Run JS Grpc Tests
run: |
echo "TEST_START_DATE=$(date +"%Y-%m-%d %H:%M:%S")" >> $GITHUB_ENV
Expand All @@ -72,11 +75,11 @@ jobs:
with:
name: ci-report-int
path: ./ci-report/ci-report.tar.gz
- name: Check Coredumps
run: sudo ./scripts/check-coredumps.sh --since "${TEST_START_DATE}"
- name: Cleanup
if: always()
run: nix-shell --run "./scripts/clean-cargo-tests.sh"
- name: Check Coredumps
run: sudo ./scripts/check-coredumps.sh --since "${TEST_START_DATE}"
# debugging
# - name: Setup tmate session
# if: ${{ failure() }}
Expand Down
2 changes: 1 addition & 1 deletion scripts/check-coredumps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ fi

# Iterate over new coredumps and print a summary and stack for each
echo "Looking for new coredumps ..."
PAGER= coredumpctl list --since="$since" || true
echo
coredump_pids=$(coredumpctl list --json=short --since="$since" | jq '.[] | select(.exe | endswith("sshd") or endswith("udisksd") | not) | .pid')
coredump_count=0
Expand All @@ -67,4 +68,3 @@ if [ "$coredump_count" -gt 0 ]; then
exit 1
fi
echo
echo "No new coredumps"

0 comments on commit 30e0ead

Please sign in to comment.