You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
CI: fail when a MoltenVK test log cannot be written - #8123
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.
Native macOS run of both step bodies, which the description lists as pending: pass. Tested 217223496 against main867d922f0 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 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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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. Ifteefailed 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
teeandCreateFileWto permit reads while locking the synthetic log against writes. Each original step returned 0 after a realteeerror. Each changed step returned 1 and did not parse the old log.test_ci_expected_failures.pypassed 12/12, andtest_ctest_registration.pypassed 4/4.git diff --checkand the changed-file no-game-data scan passed.mainand 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).