Skip to content

CI: fail when a MoltenVK test log cannot be written - #8123

Open
Barbital11111 wants to merge 1 commit into
ItsNotRexed:mainfrom
Barbital11111:fix/ci-moltenvk-tee
Open

Barbital11111 wants to merge 1 commit into
ItsNotRexed:mainfrom
Barbital11111:fix/ci-moltenvk-tee

Conversation

@Barbital11111

Copy link
Copy Markdown
Contributor

Coordination: CI-MOLTENVK-TEE (claim).

The two MoltenVK steps turn off errexit while recording test output so they can still judge a test runner's nonzero exit. They saved only the runner's half of PIPESTATUS. If tee failed to write its output file while a previous file remained readable, the wrapper could read that prior log and report success after the write failed.

Capture both statuses in the command immediately after each pipeline. Exit on a log write error before parsing the log, while continuing to pass the producer's status to the existing expected-failure judge when the log write succeeds.

Validation

  • Executed both workflow Bash bodies on Windows 11 with Git for Windows Bash, real tee and CreateFileW to permit reads while locking the synthetic log against writes. Each original step returned 0 after a real tee error. Each changed step returned 1 and did not parse the old log.
  • For each step, passing and expected-failure synthetic runners returned 0 and an unexpected failure returned 1 with a writable log.
  • test_ci_expected_failures.py passed 12/12, and test_ctest_registration.py passed 4/4. git diff --check and the changed-file no-game-data scan passed.
  • Simulated merges with current main and CI: fail on an empty Runtime CTest suite #7991 succeeded. No PR dependency.

The runners were stubbed for this test. Native macOS and hosted CI execution are pending. No GPU or game files. AI-assisted (Codex).

@vakaobr

vakaobr commented Nov 23, 2026

Copy link
Copy Markdown

Native macOS run of both step bodies, which the description lists as pending: pass. Tested 217223496 against main 867d922f0 on macOS 27.2.1 (Apple M5 Pro), with /bin/bash 3.2.57 and BSD tee.

How: I extracted the two run: | bodies from main's and this PR's runtime.yml and ran them the way a shell: bash step runs (bash --noprofile --norc -eo pipefail). ctest and scripts/run_gpu_tests.py were stubs, and scripts/ci_expected_failures.py was the real one. A "stale" log is a read-only file left from an earlier run, so tee fails with "Permission denied".

case main this PR
all pass, log writable 0 0
only the expected failure (vk_overlapping_occlusion / ps_ssharp), log writable 0 0
unexpected failure, log writable 1 1
unexpected failure, stale log listing only the expected failure 0 (false pass) 1
unexpected failure, stale log saying all passed 1 1
all pass, stale log 0 1

The bold row is the bug this PR describes, and it reproduces on macOS in both steps. On main the GPU step even prints ::warning::ps_ssharp failed, as expected until its fix is merged while the real run failed something else. With the PR both steps exit 1 there.

Code read:

  • read -r status log_status <<< "${PIPESTATUS[*]}" is the first command after the pipeline, so PIPESTATUS still holds both statuses when the here-string expands. It also works on bash 3.2 (checked), which matters if the runner's bash is /bin/bash.
  • The last row (a passing run with an unwritable log now fails) follows from "exit on a log write error before parsing the log". That seems right: CI has no log to check.

AI-assisted.

@GonZiin

GonZiin commented Nov 23, 2026

Copy link
Copy Markdown

AI-assisted defensive review of 21722349. I exercised the new status capture in Bash with synthetic producer and sink commands across all four success/failure combinations. Both statuses stayed intact with pipefail, and the workflow checks the sink status before reading the log. I did not run the macOS workflow itself. No blocking findings in this diff.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants