mirror of
https://github.com/lemonade-sdk/mac_linuxgpu.git
synced 2026-11-22 23:57:31 -10:00
The runner's bash is macOS's 3.2, where expanding an empty array under set -u is an unbound-variable error: test-kmem-release, test-kfd-session and test-kfd-power expand theirs only when set. test_aql_reset's concurrency check stored the queue's write index with a plain store while the reset thread reads it, which TSan reports as a race. The test now publishes it with a release store, as the HSA runtime does. tests/KNOWN_FAILURES.md lists the tests skipped for a known reason, and scripts/known-failure.sh gates their recipes on it. Three timing tests whose windows the shared CI VM misses are skipped there only (CI set): test-mutex-completion, test-iokit-dma and test-display-pipeline. They still run on a developer Mac. MAC_LINUXGPU_RUN_KNOWN_FAILURES=1 runs them.
19 lines
883 B
Bash
19 lines
883 B
Bash
#!/usr/bin/env bash
|
|
# scripts/known-failure.sh <make target>: exits 0, printing SKIP and the
|
|
# reason, when tests/KNOWN_FAILURES.md lists the target; exits 1 otherwise,
|
|
# and the recipe runs the test. A recipe calls it as
|
|
# bash scripts/known-failure.sh $@ || <the test>
|
|
# An entry marked (CI) is skipped only where CI is set (GitHub Actions sets
|
|
# CI=true); elsewhere the test runs. MAC_LINUXGPU_RUN_KNOWN_FAILURES=1 runs
|
|
# every listed test.
|
|
set -euo pipefail
|
|
cd "$(dirname "$0")/.."
|
|
target="${1:?usage: scripts/known-failure.sh <make target>}"
|
|
[[ -z "${MAC_LINUXGPU_RUN_KNOWN_FAILURES:-}" ]] || exit 1
|
|
[[ "$target" =~ ^[a-z0-9-]+$ ]] || exit 1
|
|
line=$(grep -m1 -E "^- \`$target\`( |$)" tests/KNOWN_FAILURES.md) || exit 1
|
|
case "$line" in
|
|
"- \`$target\` (CI)"*) [[ -n "${CI:-}" ]] || exit 1 ;;
|
|
esac
|
|
echo "SKIP $target: known failure, see tests/KNOWN_FAILURES.md (${line#*— })"
|