mirror of
https://github.com/ubiquitarianism/leonida.git
synced 2026-11-27 00:50:52 +01:00
[PR #983] Tests: seven runtime tests say what Wine's libraries answer and still check the shim (TEST-WINE-RUNTIME-TESTS) #1021
Labels
No labels
bug
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
starred/leonida#1021
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
📋 Pull Request Information
Original PR: https://github.com/ubiquitarianism/leonida/pull/983
Author: @milk4sale
Created: 11/24/2026
Status: 🔄 Open
Base:
main← Head:test/wine-runtime-tests📝 Commits (4)
8167723Tests: seven runtime tests say what Wine's libraries answer and still check the shim (TEST-WINE-RUNTIME-TESTS)e8ea3faMerge main into test/wine-runtime-tests: keep #758's versioned zero-checksum check, asked of Wine's host the same wayedaf545Merge main into test/wine-runtime-tests898c1bdMerge main into test/wine-runtime-tests: take main's Wine view checks in xmem_test📊 Changes
8 files changed (+153 additions, -29 deletions)
View changed files
📝
docs/linux.md(+32 -0)📝
docs/testing.md(+3 -2)📝
runtime/test/bcrypt_rng_test.cpp(+27 -2)📝
runtime/test/check_startup_cmdline.cmake(+9 -1)📝
runtime/test/dstorage_test.cpp(+7 -2)📝
runtime/test/gameinput_host_test.cpp(+38 -15)📝
runtime/test/host_wine.h(+8 -1)📝
runtime/test/root_sig_test.cpp(+29 -6)📄 Description
Claimed in the coordination issue as: TEST-WINE-RUNTIME-TESTS (claim)
What and why
Seven runtime tests (six test programs) fail under Wine on what Wine's own libraries do, not on the shim or the loader they are there to check. Each now says what the host did and still checks our side where it can, as #519 did for the D3D12 and DXGI tests.
mainbcrypt_rng,bcrypt_rng_seeded0xC0000002for an unknown name, Microsoft's answersSTATUS_NOT_FOUND, and the test expects the second.BCryptOpenAlgorithmProviderdirectly and checks that the shim returns the same failure with a null handle. The value itself is still checked wherever the host is not Wine.gameinput_hostGameInput.dllloads, and itsGameInputCreateanswersE_NOTIMPL: 3 failures.GameInputCreate, asked before anything is mapped, answersE_NOTIMPL.root_sigE_INVALIDARG) and takes the same one with its checksum intact. The shim forwards the cleared copy, so it cannot succeed there.run_startup_cmdlineucrtbasehas__argc,__argvand__wargvset before process attach, and the fixture expects them unset there, as on Windows.RUNNERset) it is reported and not required. Without one it is required as before. The run throughgta6rtis checked on every host, and passes.dstoragethe copy reached the guard pageanda running request is pendingfail. The one-page allocation can land right above the queue worker's stack, and Wine drops the guard of a page that starts at the reading thread'sStackBasewithout raising anything. One page higher the exception arrives.xmemSEC_RESERVEview goes through with no fault andVirtualQuerykeeps reportingMEM_RESERVE, so xmem's first-touch handler never runs.rt::xmem::commit_physical_range, the call the runtime makes before it imports title memory, and the bytes written before must still be there. On Windows the first touch has to have committed it, as before.runtime/test/host_wine.hgetsis_wine(), the host check with nothing printed;host_is_wine()calls it and behaves as before.docs/linux.mdgets a section listing these differences, plus the two that still fail tests (file_system,device_proxy), anddocs/testing.mdpoints to it. Tests and docs only: no shim, loader or layer change.Not in this pull request:
file_system(a real shim difference under Wine, posted as a finding),device_proxyanddevice_proxy_trace(BL-2, #913), and the eight tests of #519. This shares no file with #519 and does not depend on it.Tested
Cross-built on Linux with clang-cl 23.1.4 and xwin (SDK 10.0.26100), run under wine-staging 11.21.
maincf4c00cba: all pass, with theseSKIPlines: the unknown-algorithm value (2), the calls into GameInput.dll (1), the zero-checksum deserializer check (1), the first-touch commit (2), the native control forargsandno_args(2). The branch was then rebased on98a977b4b, two merges later, which touch onlyvk_store_testand shader fixtures; not rebuilt after that.is_wine()forced tofalseand the four programs that use it rebuilt,bcrypt_rng,bcrypt_rng_seeded,gameinput_host,root_sigandxmemfail with the same eightFAILlines they print onmain(1 + 1, 3, 1 and 2).dstoragehas no host check, andrun_startup_cmdlinekeys onRUNNER, not on Wine.ctest -j 4, onmain1504c1af6: 17 fail with this change. A run of the same tree with the seven files atmain's versions gave 25. The seven go from failed to passed in that comparison. The two runs were not equally quiet: the machine was busy with other jobs during the second (load average above 40), and five more results differ between them:run_tiny_frame,run_tiny_frame_queue_test_settingsandd3d12_queue_wait_timeoutfailed only in the base run, andd3d12_xdxr_rttimed out (sod3d12_xdxr_rt_checkdid not run) only in the patched one. None of those five uses a program that was rebuilt between the runs, so I count them as timing noise, not as an effect of the change. Without that pair the 15 still failing here aredevice_proxy,device_proxy_trace,file_system,d3d12_clear,d3d12_clear_formats,d3d12_present,xbox_present(a tiling compositor resizes their window) and the eight of #519.tests/test_docs_*.py,python -I scripts/check_no_game_data.pyon the nine files, andgit diff --check.main4a50cafc7into the branch (e8ea3fa0c; it conflicted with #758 inroot_sig_test.cpp): rebuilt, and the seven tests pass under Wine. #758's new check, that the versioned deserializer shim accepts a zero-checksum blob, is kept next to the legacy one and asks Wine's host the same way, since the versioned shim forwards the same cleared copy and Wine refuses a zero checksum there too;root_sigprints one moreSKIPline for it. With the Wine check forced off in that file both zero-checksum checks run, so on Windows #758's check runs as it was written.Not run on Windows, and not built with MSVC: I have neither here. On Windows
is_wine()is false andRUNNERis empty, so each test takes the path it took before, exceptdstorage, whose guard page moves inside a three-page allocation on every host, andbcrypt_rng, which also compares the shim's status with the host's.GPUs tested: NVIDIA GeForce RTX 4070 Ti, driver 620.70.06, Linux (CachyOS), through wine-staging 11.21
AI-assisted: yes
Checklist
mainand merges cleanly (a conflicting pull request is labeledneeds rebase).docs/design.md, with how it was confirmed.🤖 Generated with Claude Code
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.