GHA: Get diagnostics data from hanging check-context test

This commit is contained in:
Nicolas Williams
2026-02-07 22:45:45 -06:00
parent c999e5a33a
commit 4fe0ad8e2c
3 changed files with 24 additions and 1 deletions

View File

@@ -108,6 +108,27 @@ jobs:
make DESTDIR=/tmp/h5l install
cd /tmp/h5l
tar czf $HOME/heimdal-install-linux-${{ matrix.compiler }}.tgz .
- name: Interrupted/timed out test diagnostics
if: ${{ cancelled() || failure() }}
run: |
set -x
# Show any test-related processes still running
ps auxww | grep -E 'kdc|test_context|kinit|kadmin|check-' | grep -v grep || true
# Show who's on the test port
ss -tlnp sport = :49188 || true
# Show the newest .log file (the one likely interrupted)
newest=$(find build/tests -name '*.log' -newer build/tests/gss/Makefile -printf '%T@ %p\n' 2>/dev/null | sort -rn | head -1 | cut -d' ' -f2-)
if [ -n "$newest" ]; then
echo "=== Newest test log: $newest ==="
cat "$newest"
fi
# Also show KDC messages.log if any exist
for f in build/tests/gss/messages.log build/tests/kdc/messages.log; do
if [ -f "$f" ]; then
echo "=== $f ==="
tail -100 "$f"
fi
done
- name: Core dump stacks
if: ${{ always() }}
run: |

View File

@@ -272,7 +272,7 @@ test_run_x() {
# Run with tracing enabled
(
set -x
set -vx
"$@"
) > "$cmd_out" 2>"$trace_out"
rc=$?

View File

@@ -77,6 +77,8 @@ rm -f mkey.file*
test_init
alias test_run=test_run_x
test_section "Creating database"
# add both lucid and lucid.test.h5l.se to simulate aliases
# XXX ext should ext aliases too