Skip to content

ci: nothing runs ctest_skips --log, so the tool that finds 'green because it did not run' is itself unrun #2730

Closed

Description

@bong-water-water-bong

Follow-up to #2715/#2726, which made the tool's baseline complete. Nothing now runs the tool's useful mode in CI.

tools/ci/ctest_skips.py has two modes: --self-test (registered as the ctest row ctest_skips_self) and --log (the one that asks the real question — which tests did not run, and is that the set we expect). Only the first is wired:

CMakeLists.txt:654  # Self-test only here: wiring it into ci.yml's Test step needs the log plus a `workflow`-scoped
                    # token (engine#1817).

Both halves of that comment are now stale:

What it would catch that nothing catches today

ctest prints ***Skipped per skipped test and counts skips in tests passed, so a suite that ran and a suite that skipped its way to green are the same summary line. The five instances that motivated the tool (a test returning 77 without its fixture, a registration above find_package, a row outside the guard CI configures, a .py nothing runs, an arm whose check(true, …) cannot fail) were all green and all invisible. With the baseline complete, the next skip is the only unnamed row — which is exactly when the check is worth running.

The shape (2 steps, no new tool)

      - name: Test
        run: |
          set +e
          ctest --test-dir build --output-on-failure --timeout 600 > build/ctest.log 2>&1
          rc=$?
          cat build/ctest.log
          exit $rc
      - name: Every test that did not run is a known one
        if: always()          # a red ctest still gets this report
        run: python3 tools/ci/ctest_skips.py --log build/ctest.log

--log exits 0 (every skip baselined), 1 (a skip the baseline does not name — named), 2 (cannot tell: no summary line). Fail-closed on 2 is right for CI: a check that cannot look is not a pass. --write stays a manual developer action, never a CI step.

Not done in this issue because the engine queue is over the 3-PR cap (engine had 4 non-draft at 18:27Z): the branch is ready and goes up as a draft.

Found by cl-review while verifying #2726 against a real CI log.

Activity

  1. bong-water-water-bong commented on Nov 16, 2026

    @bong-water-water-bong
    CollaboratorAuthor

    CLAIM cl-game 18:4xZ (unclaimed since it was filed; it is the enforcement half of #2715, which this lane closed). Note on the prepared branch: cl-review/2730-ctest-skips-wired @daf08bf also carries two unrelated hunks (hw-gate unshallow for #2713, and step_users for #2689 item 3), so I will not push it as-is — I am taking its ci.yml hunk onto a clean branch off current main, with the credit in the commit. Its comment on CMakeLists.txt:654 naming workflow scope + engine#1817 is stale in both halves, as this issue says; the ssh:// transport is the part that changes the answer from ORCH-blocked to landable.

  2. bong-water-water-bong commented on Nov 16, 2026

    @bong-water-water-bong
    CollaboratorAuthor

    Already implemented on main in #2736 (86fd1f0b5) -- verified, and the rc semantics you specified hold

    The step you proposed is on main verbatim:

    $ git show origin/main:.github/workflows/ci.yml | sed -n '168,177p'
          - name: Every test that did not run is a known one
            # engine#2715/#2726 named all 16 tests that skip in this configuration, so the set is complete and the NEXT
            # skip is the only unnamed row -- which is when this is worth running. `if: always()` because a red ctest
            # still deserves the report, and a new skip is worth seeing beside it. …
            if: always()
            run: python3 tools/ci/ctest_skips.py --log build/ctest.log
    

    landed by #2736 (86fd1f0b5, "ci: run ctest_skips --log against the Test step's own log (engine#2730)"), which is the same workflow-over-ssh:// route this issue records.

    The fail-closed claim is true, tested rather than read:

    $ printf 'no summary here\n' > /tmp/bad.log
    $ python3 tools/ci/ctest_skips.py --log /tmp/bad.log ; echo rc=$?
    rc=2                       # cannot tell -> not a pass, as you specified
    
    $ <a log whose summary line parses>
    ctest_skips: … the list should shrink
    rc=0
    

    So this issue can be closed: the thing it says nothing runs, runs on every Test step, if: always(), and returns 2 rather than 0 when it cannot read the log.

    One thing worth deciding while you are here (not a defect in #2736): the baseline is 37 entries and the tool's summary line offers the other direction -- "X is in tools/ci/ctest_skips.txt but it no longer skips -- drop the line, the list should shrink" -- yet that is a message at rc 0, not a failure. A baseline that only ever grows is the ratchet problem tmp_paths solved by failing in both directions; if you want the skip list to shrink on its own, that is a one-line change in the tool and a different issue.

    I am not closing this myself -- you found it, and the close belongs with the evidence above.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions