Skip to content

vk_device_filter_tools: run the cross build's PE harnesses through wine (TEST-DEVICE-FILTER-TOOLS-WINE) - #1618

Closed
PierreEbele wants to merge 1 commit into
ProjectLeonida:mainfrom
PierreEbele:wine-device-filter-tools
Closed

PierreEbele wants to merge 1 commit into
ProjectLeonida:mainfrom
PierreEbele:wine-device-filter-tools

Conversation

@PierreEbele

Copy link
Copy Markdown
Contributor

Claimed in the coordination issue as: TEST-DEVICE-FILTER-TOOLS-WINE (#1608)

What and why

On Linux, the Windows cross build's vk_descriptor_bench and vk_sandbox are PE executables. runtime/test/check_device_filter_tools.py started them as they were, so the vk_device_filter_tools ctest entry always died with OSError: [Errno 8] Exec format error, and the TEST-1141 check that both tools refuse a LEONIDA_VK_DEVICE filter matching no GPU never ran under Wine.

Now a PE on a host that can't run one goes through the wine that runs the suite: the WINE override of scripts/run_wine_tests.py, else wine on PATH. A run with no wine at all skips with 77, like a machine with no Vulkan device. Native Windows and native Linux tools are started as before.

tests/test_check_device_filter_tools.py covers the three cases (native tool, PE through wine, no wine: skip 77) with fake tools and a stub wine.

Tested

  • python3 -I tests/test_check_device_filter_tools.py: 5 tests OK.
  • Against the real Windows cross-build tools (clang-cl + xwin) under Wine 10.0, GTX 1050 Ti / NVIDIA 555.58:
    • main's checker: exit 1, OSError: [Errno 8] Exec format error: '.../vk_descriptor_bench.exe'
    • this branch: exit 0, ok: vk_descriptor_bench refuses LEONIDA_VK_DEVICE=leonida-no-such-gpu (exit 1) and the same for vk_sandbox.
  • Native Windows: not run (the change only adds the wine path; the native branch is unchanged).

AI-assisted (written with Mistral Vibe, reviewed and tested with Claude Code).

🤖 Generated with Claude Code

On Linux the Windows tree's vk_descriptor_bench and vk_sandbox are PE
executables; check_device_filter_tools.py started them as they were, so
every run of the ctest entry died with "OSError: [Errno 8] Exec format
error" and the LEONIDA_VK_DEVICE refusal of TEST-1141 was never checked
there. A PE on a host that cannot run one now goes through the wine that
runs the suite (the WINE override of scripts/run_wine_tests.py, else the
wine on PATH), a run without any wine skips with 77 like a machine with
no Vulkan device, and tests/test_check_device_filter_tools.py keeps the
three behaviours with fake tools and a stub wine. Under Wine 10.0 the
ctest entry passes again (both tools refuse the filter).

Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
@PierreEbele

Copy link
Copy Markdown
Contributor Author

Closing as a duplicate of #1219 (robot00f), which fixes the same thing and was claimed first; I missed it when checking. I tested #1219 with the real Windows tools under Wine and posted the result there. AI-assisted.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant