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.
Standalone unit tests for the linuxu shim layer. Each test is a plain
main() program using a local EXPECT() macro (no test framework —
the dext cannot link gtest/libc-test deps).
Build & run
cd <repo>/linuxu
# host build (no DriverKit): -fsyntax-only first, then real link
clang -std=gnu11 -D__KERNEL__ -I<repo>/linuxu/headers \
<test>.c <required shim .c files> -lpthread -o <test>
./<test>
The make test target (top-level Makefile) builds and runs all of
them. Per-test required shim files:
REAL (assertions exercise the actual algorithm): kmemcheck
canaries, fake-MMIO token table + 16KB slots + readl/writel dispatch,
vram bump allocator + pfn mapping, irq register/inject/unregister,
workqueue (pthread worker + jiffy-delayed promotion +
cancel_delayed_work_sync), timer_list (4ms reaper), xarray
(node tree + xa_alloc), rcu (per-thread defer list + synchronize
barrier).
STUB (documented, no assertions beyond "does not crash"):
i2c (xfer → -ENOENT), acpi, mmu_notifier, dev_coredump, module,
firmware (loader is REAL for the host build; the dext build swaps
in the embedded-table path), debugfs/sysfs (table no-ops — could be
extended with a test_debugfs later).
Running without a GPU
All tests run in-process on the host with no GPU, no IOKit, and no
root. The fake-MMIO and vram backends use host shadow buffers; the
LINUXU_DEXT compile flag switches them to the IOPCIDevice
backends (compiled only for the dext bundle, not for these tests).