test(hle): align the ucrt serve test with #104, and add a macos verify gate #370
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/370"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by wz11wz on 2026-11-27T14:26:25Z.
What this does
Aligns a test with #104.
dlls_that_are_not_the_c_runtime_are_left_alonestill asserts the pre-#104 behaviour: it expectslookup("vcruntime140.dll", "memcpy")to answerNone. Since #104 the ucrt servesvcruntime140.dll's memory and string functions while the title has not mapped its own copy (itsmemsetandmemcpycame back as no-op stubs in a failed load), so the test fails on every clean checkout.The test is renamed to say what it now checks -
only_the_ucrt_and_an_unloaded_vcruntime_are_served- keeps themsvcp140.dllassertions, and documents why a bare test process sees the served branch (the loader registry is empty, soservesanswers yes; a title that mapped its own copy would makefindanswer and the ucrt step aside).Adds a one-command verification gate.
tools/macos/verify.shwraps the checks CONTRIBUTING.md already asks for - both documented test suites plus the CI clippy run for the Windows target - and prints one PASS/FAIL line per check with the counts:It exits non-zero on any failure, so it can gate a pull request from a hook or CI.
verify.sh quickruns only the two test suites.How I found the stale test
While writing the gate, its first run on a clean checkout failed with exactly one failure - the ucrt test above - which is how I noticed
servesand its test had drifted apart in #104.Testing
The new gate, 3/3 PASS on this branch: suite-hle 384 passed, suite-shader 520 passed, clippy clean for
x86_64-pc-windows-gnullvm.Happy to split this into two PRs if you prefer the gate separate.
Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by Olima34 on 2026-11-27T14:42:08Z.
Check report:
534370b6merged onto main728845d1(M5 Pro 48 GB).cargo test --target x86_64-apple-darwin -p victory-hlefailshost_posix::ucrt::tests::dlls_that_are_not_the_c_runtime_are_left_aloneatucrt.rs:334(320 passed, 1 failed). With this PR it passes (321 passed). On arm64 both pass (141), and CI on Windows never ran the failing case.cargo test -p victory-hle -p victory -p victory-gpu -p xtaskpasses, Windows clippy is clean,cargo xtask policypasses, andsh -n tools/macos/verify.shis ok.One thing before merging:
verify.shdoesn't run the checks AGENTS.md and CI ask for. It runsvictory-hle,victory-loader,victoryandvictory-shader, but notvictory-gpu(natively on arm64, where it runs on a Mac) norcargo xtask policy. A gate that passes while those fail would mislead. @wz11wz, could you add them (cargo test -p victory-gpuwithout--target, andcargo xtask policy), or name the script for what it does run? The ucrt test fix alone could go in now if you split it out.Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by wz11wz on 2026-11-27T14:56:45Z.
Added both gates (2nd commit):
cargo test -p victory-gpunatively, andcargo xtask policy.That gate immediately found something on this machine worth knowing: victory-gpu's native tests need Apple's Metal Shader Converter, and a clean M1 Max without it fails 3 texture tests on main too (confirmed on
main, not this branch):no mesh pipelineat texture_tests.rs:1101/1154/1207, one of them thelibmetalirconverter.dylibdlopen directly. native-setup.sh does check for it (warns), andVICTORY_MSC_DYLIBis honoured - but GPTK's bundled copy (D3DMetal 4.0b3'slibmetalirconverter.dylib) is not a compatible substitute: pointingVICTORY_MSC_DYLIBat it turns the 3 failures into 129. The standalone MSC distribution is the real prerequisite.So on this machine the full gate stays red until MSC is installed; every other gate is green (suite-hle 384, suite-shader 520, policy, clippy). The ucrt test fix itself needs none of that, so splitting it out as you suggested works if you want it now - say the word and I'll spin it off.
Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by LakshanSivakumar on 2026-11-27T16:01:12Z.
Merged in
002c3291. I fixed the usage comment at the top of verify.sh on top, since quick and full now run more than it said. Ran the tests, Windows clippy and the policy check on the merged tree. Thanks.