Guard failed-unittest gathering against no core files

XMLWordPrintableJSON

    • Type: Task
    • Resolution: Fixed
    • Priority: Minor - P4
    • 9.1.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • None
    • DevProd Test Infrastructure
    • Fully Compatible
    • DevProd Test Infra 2026-09-08, DevProd Test Infra 2026-09-22
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Another hole found ahead of enabling `post_error_fails_task`/`teardown_task_can_fail_task` broadly.

      `evergreen/failed_unittests_gather.sh`'s `while read ... done <<<"${core_files}"` always ran its body at least once, even when `core_files` was empty (a here-string on an empty var still feeds one empty line to `read`). With `gdb` present and an empty `$core_file`, the pipeline feeding `binary_file=$(...)` returns nonzero, and `set -e`/`pipefail` aborted the script — on every green unit-test task, not just failures. This was silently swallowed until teardown failures can fail the task.

      Fix: skip the loop entirely when there are no core files.

            Assignee:
            Steve McClure
            Reporter:
            Steve McClure
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: