From 484ee0b631d0be5c6a47de39eafe5fcb0bf1114c Mon Sep 17 00:00:00 2001 From: Frantisek Sumsal Date: Thu, 19 Oct 2023 09:58:22 +0200 Subject: [PATCH] Apply the coredump-collecting tweaks to RHEL jobs as well Follow-up to b270551. --- agent/testsuite-rhel8.sh | 14 +++++++++++--- agent/testsuite-rhel9-sanitizers.sh | 6 ++++++ agent/testsuite-rhel9.sh | 6 ++++++ 3 files changed, 23 insertions(+), 3 deletions(-) diff --git a/agent/testsuite-rhel8.sh b/agent/testsuite-rhel8.sh index 72817e11..2175df2f 100755 --- a/agent/testsuite-rhel8.sh +++ b/agent/testsuite-rhel8.sh @@ -41,9 +41,14 @@ else fi # Enable systemd-coredump -if [[ $COLLECT_COREDUMPS -ne 0 ]] && ! coredumpctl_init; then - echo >&2 "Failed to configure systemd-coredump/coredumpctl" - exit 1 +if [[ $COLLECT_COREDUMPS -ne 0 ]]; then + if ! coredumpctl_init; then + echo >&2 "Failed to configure systemd-coredump/coredumpctl" + exit 1 + fi + + # Collect any coredumps that happened during boot + exectask "coredumpctl_collect_boot" "coredumpctl_collect" fi set +e @@ -74,6 +79,9 @@ exectask "ninja-test" "meson test -C build --print-errorlogs --timeout-multiplie # Copy over meson test artifacts [[ -d "build/meson-logs" ]] && rsync -amq --include '*.txt' --include '*/' --exclude '*' "build/meson-logs" "$LOGDIR" +# Ignore any coredumps generated by unit tests, as there's a lot of intentional crashes +coredumpctl_set_ts + ## Integration test suite ## CHECK_LIST=() SKIP_LIST=( diff --git a/agent/testsuite-rhel9-sanitizers.sh b/agent/testsuite-rhel9-sanitizers.sh index df53b3ec..942436cc 100755 --- a/agent/testsuite-rhel9-sanitizers.sh +++ b/agent/testsuite-rhel9-sanitizers.sh @@ -53,6 +53,9 @@ if ! coredumpctl_init; then exit 1 fi +# Collect any coredumps that happened during boot +exectask "coredumpctl_collect_boot" "coredumpctl_collect" + centos_ensure_qemu_symlink if [[ $(cat /proc/sys/user/max_user_namespaces) -le 0 ]]; then @@ -106,6 +109,9 @@ exectask "check-meson-logs-for-sanitizer-errors" "cat $BUILD_DIR/meson-logs/test # Copy over meson test artifacts [[ -d "$BUILD_DIR/meson-logs" ]] && rsync -amq --include '*.txt' --include '*/' --exclude '*' "$BUILD_DIR/meson-logs" "$LOGDIR" +# Ignore any coredumps generated by unit tests, as there's a lot of intentional crashes +coredumpctl_set_ts + ## Generate a custom-tailored initrd for the integration tests # The host initrd contains multipath modules & services which are unused # in the integration tests and sometimes cause unexpected failures. Let's build diff --git a/agent/testsuite-rhel9.sh b/agent/testsuite-rhel9.sh index 785eb0e5..05cee9b4 100755 --- a/agent/testsuite-rhel9.sh +++ b/agent/testsuite-rhel9.sh @@ -42,6 +42,9 @@ if ! coredumpctl_init; then exit 1 fi +# Collect any coredumps that happened during boot +exectask "coredumpctl_collect_boot" "coredumpctl_collect" + if [[ $(cat /proc/sys/user/max_user_namespaces) -le 0 ]]; then echo >&2 "user.max_user_namespaces must be > 0" exit 1 @@ -102,6 +105,9 @@ if ! git diff --quiet main HEAD && ! git diff "$(git merge-base main HEAD)" --na finish_and_exit fi +# Ignore any coredumps generated by unit tests, as there's a lot of intentional crashes +coredumpctl_set_ts + ## Integration test suite ## EXECUTED_LIST=() FLAKE_LIST=(