Skip to content

[quality] Unit tests check is green while 18 BATS tests fail (masked by | tee) #1000

Description

@castrojo

Finding

The required Unit tests check in .github/workflows/pr-validation.yml runs:

- name: Run unit tests
  run: bats --formatter tap tests/unit/ | tee results.tap

The pipeline's exit status is tee's, so a failing BATS run never fails the step. On the ubuntu-latest runner today, 18 of 148 tests fail and the check still reports green — for example all of tests/unit/04-install-kernel-akmods_test.bats tests 26-42 ([ "$status" -eq 0 ]' failed), plus 20-framework: non-writable brew prefix skips install with warning and Stable image embeds the Titanoboa ISO contract and installer configuration.

Discovered while landing #911 (BATS coverage, #518): the new instrumented coverage rerun ran under set -euo pipefail and was the only step that surfaced these failures. Reproduced identically in a clean ubuntu:24.04 container with and without kcov, so this is not an instrumentation artifact.

Recommendation

  1. Set shell: bash + set -o pipefail (or use bats ... > results.tap and cat afterwards) so the step's status reflects the BATS result.
  2. Fix or quarantine the 18 currently-failing tests first — flipping the gate before that will immediately red-line every PR.

Priority

  • Impact: high (a required status check is not actually gating)
  • Effort: low for the gate, medium for the test fixes

Metadata

Metadata

Assignees

No one assigned

    Labels

    3-clanker-queueWork admitted to the agent-maintained queue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions