This page documents the current Wine-NSPA validation harness: the two-layer full-suite boundary, the default PE validation matrix, the native ntsync suite, and the targeted validators that sit outside the archived matrix.
The current test surface is split into four categories:
wine/nspa/tests/test-*.c that talk directly to /dev/ntsync ioctls.
These cover kernel invariants the Win32 layer cannot reach directly.nspa_rt_test.exe in baseline and RT modes.
This is the archived user-visible full-suite matrix.srw-bench and
seqlock-bound. These are useful for measurement, but they are not part of
the default validation matrix.The important maintenance rule is that these categories are not interchangeable. If a carry is validated only by a targeted harness, the public docs should say that explicitly instead of silently folding it into the matrix totals.
The current archived full-suite snapshot is:
| Item | Value |
|---|---|
| Archive | v9-validation-default |
| Archive timestamp | 2026-05-03 12:54:16 -0500 |
| Layer 1 native suite | 3 PASS / 0 FAIL / 0 SKIP |
| Layer 2 PE matrix | 32 PASS / 0 FAIL / 0 TIMEOUT |
| Layer 2 test count | 16 default tests x 2 modes |
| Modes | baseline and rt |
Layer 2 in this archived snapshot covers:
rapidmutexphilosophersfork-mutexcs-contentionsignal-recursionlarge-pagesntsync-d4ntsync-d8ntsync-d12socket-iocondvar-pint-timerwm-timerrpc-bypassirot-bypassdispatcher-burstMode definitions:
WINEDEBUG=-all with the normal default-on Wine-NSPA stack,
but without RT promotionWINEDEBUG=-all NSPA_RT_PRIO=80 NSPA_RT_POLICY=FF WINEPRELOADREMAPVDSO=forceOne detail worth preserving in the docs: socket-io currently reports an
implicit verdict in the suite archive (PASS*) because the test exits 0
without printing an explicit PASS line. The suite still counts it as a pass,
but the output format difference is intentional and should stay documented.
The newer subsystem carries that were validated after this archive should be described as targeted validators unless and until another full archived matrix is cut.
The current default PE matrix is driven by nspa/run_rt_tests.sh. It is a
validation set, not a “run every possible subcommand” set.
| Test | Surface | Primary contract |
|---|---|---|
rapidmutex |
CRITICAL_SECTION fast path |
integrity and wait-bound behavior under hot contention |
philosophers |
transitive PI chain | no starvation or deadlock through the chain |
fork-mutex |
process spawn path | repeated CreateProcess + child exit stays clean |
cs-contention |
CS-PI slow path | RT waiter is bounded behind a normal-priority holder |
signal-recursion |
virtual_mutex + fault path |
recursive PAGE_GUARD fault path stays deadlock-free |
large-pages |
large-page alloc + mapping + reporting | allocation, SEC_LARGE_PAGES, and QueryWorkingSetEx semantics |
ntsync-d4 / d8 / d12 |
userspace sync -> /dev/ntsync |
PI, priority wakeup, chain semantics, WFMO |
socket-io |
deferred socket path | latency / completion correctness on RECVMSG + SENDMSG |
condvar-pi |
Win32 condvar PI bridge | waiter wake / mutex reacquire path stays PI-clean |
nt-timer |
local NT timer path | timer create/set/cancel/query/wait semantics |
wm-timer |
local WM_TIMER path |
message delivery, coalescing, kill semantics |
rpc-bypass |
irpcss bypass path |
functional parity across the RPC bypass surface |
irot-bypass |
Running Object Table bypass path | functional parity across the ROT bypass surface |
dispatcher-burst |
gamma dispatcher hot path | same-path request/reply correctness and burst-drain behavior |
| Test | Gate | Why it is excluded by default |
|---|---|---|
priority |
INCLUDE_PRIORITY=1 |
it sleeps for manual ps / chrt inspection and is not a routine matrix test |
srw-bench |
WITH_BENCH=1 |
CPU-heavy perf benchmark rather than contract validation |
seqlock-bound |
WITH_BENCH=1 |
workload-bound perf / retry probe, not default validation |
dispatcher-burst remains important because most other PE tests do not stress
the gamma dispatcher path directly. It is the PE-side oracle for:
channel_dispatcherdispatch_channel_entryTRY_RECV2 burst drainArchived v9-validation-default result:
| Metric | Result |
|---|---|
| baseline verdict | PASS |
| rt verdict | PASS |
| archive position | part of the 16-test default matrix |
The earlier 2026-04-30 A/B numbers remain useful historically, but the current public fact is that dispatcher coverage is part of the default full-suite boundary rather than a side harness.
Layer 1 is driven by wine/nspa/tests/run-rt-suite.sh native. These tests
exercise kernel-only invariants that the PE layer cannot reach directly.
| Test | Coverage |
|---|---|
test-event-set-pi |
EVENT_SET_PI smoke and boost shape |
test-channel-recv-exclusive |
channel receive wake behavior |
test-aggregate-wait |
aggregate-wait coverage including mixed object/fd and kitchen-sink cases |
Archived v9-validation-default result:
3 PASS / 0 FAIL / 0 SKIPtest-aggregate-wait: 9/9 PASSThese are not part of the default validation boundary:
| Test | Gate | Purpose |
|---|---|---|
test-channel-stress |
WITH_NATIVE_STRESS=1 |
channel churn / cleanup hammer |
test-event-set-pi-stress |
WITH_NATIVE_STRESS=1 |
EVENT_SET_PI stress |
test-mixed-load-stress |
WITH_NATIVE_STRESS=1 |
mixed-driver soak |
test-mutex-pi-stress |
WITH_NATIVE_STRESS=1 |
mutex PI contention hammer |
SKIPPED_BY_DESIGNTwo tests remain excluded because they assert behavior that is no longer part of the active kernel/userspace contract:
test-cross-boosttest-wait-rejects-channelThey are kept as source history and canaries, not as active validation.
These checks matter, but they are not the same thing as the archived matrix.
| Surface | Validator | Public use |
|---|---|---|
sched-hosted local_timer / local_wm_timer |
run-rt-probe-validation.sh |
targeted scheduler-host validation |
socket RECVMSG / SENDMSG tuning |
socket-io plus workload captures |
latency / throughput follow-on measurement |
| thread/process shared-state readers | dedicated A/B harnesses | query-class and zero-time-wait correctness |
| msg-ring empty-poll and TEB carries | workload counters | hot-path cost measurement |
| RT-keyed memory follow-ons | shell harnesses such as test-mlock-ws.sh, test-huge-auto.sh, test-heap-hugepage.sh |
memory-specific correctness and behavior |
This separation is what keeps the public numbers honest: the archived full-suite totals stay stable, while newer subsystem carries can still be documented with their own validators.
wine/nspa/tests/run-rt-suite.sh drives the public two-layer suite:
wine/nspa/tests/run-rt-suite.sh
wine/nspa/tests/run-rt-suite.sh native
wine/nspa/tests/run-rt-suite.sh wine
It:
nspa/run_rt_tests.shnspa/run_rt_tests.sh is the Layer 2 orchestrator. It:
baseline and rtPASS / FAIL lines or exit codeVerdict resolution order:
TIMEOUTPASS line -> PASSFAIL line -> FAILPASS* / FAIL*
i686-w64-mingw32-gcc -O2 -static programs/nspa_rt_test/main.c -o nspa_rt_test.exe -lws2_32
Native ntsync tests are built on demand by run-rt-suite.sh.
The harness has two layers of timeout protection:
nspa_rt_test.exerun_rt_tests.shOther safety rules:
nspa_rt_test.exe processes are reaped between runsThese are part of the methodology, not just implementation detail: they keep the validation suite usable on a real development machine.
cmd_foo() handler to programs/nspa_rt_test/main.c.commands[] table.tests=() array in
nspa/run_rt_tests.sh.test-foo.c under wine/nspa/tests/.test-foo to NATIVE_TESTS=() or NATIVE_STRESS_TESTS=().77 for skip.The important maintenance rule is classification: do not put a perf probe into the default validation matrix unless it is actually validating a contract.
| Variable | Purpose |
|---|---|
WINE |
Wine binary path |
WINEPREFIX |
prefix used for Layer 2 |
TEST_EXE |
nspa_rt_test.exe path |
LOG_DIR |
per-run Layer 2 logs |
TIMEOUT_SECS |
shell-level timeout |
RT_PRIO / RT_POLICY |
RT-mode settings |
| Variable | Effect |
|---|---|
INCLUDE_PRIORITY=1 |
include priority in Layer 2 |
WITH_BENCH=1 |
include srw-bench and seqlock-bound |
WITH_NATIVE_STRESS=1 |
enable native stress tests |
NATIVE_STRESS_DURATION=N |
per-stress-test duration |
| Requirement | Why it matters |
|---|---|
/dev/ntsync present |
Layer 1 and ntsync Layer 2 tests |
| RT-capable kernel | RT-mode scheduling behavior |
| hugepages configured | large-pages path |
RT privilege / CAP_SYS_NICE |
FIFO promotion in RT mode |
For matrix lineage and comparability rules, see nspa-test-comparison.