test(agc): skip the no-driver device test where an elevated loader still opens a device #14069
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/14069"
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 boykopovar/AnyPS5. Originally posted by medazizktata on 2026-10-31T17:47:00Z.
What
agc_driver_vulkan_test_device_no_driverhides the Vulkan driver by pointingVK_DRIVER_FILESandVK_ICD_FILENAMESat a manifest that does not exist. It then expectsOpenVulkanTestDeviceto report no device. On Windows the Vulkan loader ignores both variables in a process at high integrity or above (is_high_integrityin the loader'sloader_environment.c). WithVK_LOADER_DEBUG=allit says so:Loader is running with elevated permissions. Environment variable VK_DRIVER_FILES will be ignored.So when the test runs elevated on a machine with a GPU, it opens the GPU and fails:
An OpenSSH session of an administrator account is elevated, for example.
The test now skips when the process is elevated and a device opened anyway, and the skip message names the device. When no device opens, it runs every check as before. The elevation check is the loader's own: the token's integrity level is at least
SECURITY_MANDATORY_HIGH_RID.CI does not show the failure:
ExecutionTestNotBuilt.cppin its place (-DANYPS5_AGC_EXECUTION_TESTS), so CI does not compile the new_WIN32code.Test only; no runtime change.
Tested
Windows 11 Pro 10.0.26200, i5-12600KF, NVIDIA GeForce RTX 4060, driver 610.88, Vulkan loader 1.4.363, WinLibs GCC 15.2.0 r7, Release,
maincd087bd12c. "Medium" is the same ctest started with a copy of the token lowered to medium integrity.agc_driver_vulkan_test_device*main_no_driverfails 3/3 (above)_no_driverskipped:skipped, the Vulkan loader ignores VK_DRIVER_FILES in an elevated process and opened NVIDIA GeForce RTX 4060_no_driverruns every check_no_driverfails 3/3_no_driverskipped;agc_driver_vulkan_test_devicepasses 5/5ctest -R ^agc -j4, elevated,VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation,ANYPS5_NO_SHADER_CACHE=1ctest -E agc, elevatedPop!_OS 24.04, GCC 13.3.0, Release, llvmpipe: both tests pass 3/3, and
_no_driverruns every check. The test binary does not change, because the new code is Windows-only.ctest -E agcpasses 1917/1917.Not tested: an elevated run on an AMD or Intel GPU.
Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-31T17:59:52Z.
Review: APPROVED
Reviewed — looks good
The new skip is limited to an elevated Windows run that actually opens a device despite the configured no-driver environment, while the no-device assertions remain in place.
What I ran
Reviewed head
3913101faca7cde2b88cab5f01377efd060fbfbaagainst base0f302813cebfc09e3e0b6f8fced15262d186879e; the merge preview is clean. Environment: Debian Linux 6.1, Python 3.11.2. I did not compile the Windows-only test code.Results
main, with no declared dependencies.VulkanTestSkippedvalue (77), and CTest already maps 77 to skipped for this test. The path only skips when the initial open returned a device and the Windows token is high-integrity or above.ExecutionTestNotBuilt.cppin place of this test source; Linux and other build/test jobs were skipped.Raw outputs and relevant source excerpts
Conventions output:
Dependency report:
CTest registration:
Vulkan loader source at 1.4.365 reports elevated integrity at or above
SECURITY_MANDATORY_HIGH_RID; the added helper uses the same threshold. The loader's secure environment lookup returns no value at that integrity level.Negative control
HighIntegrity()to return false on the author’s Windows 11/RTX 4060 setup.Findings
Blocking
None found.
Non-blocking
None.
Sources
Not verified
I did not compile or run the Windows-only test code. The author’s reported Windows and Linux runs were not independently reproduced; the hosted Windows build replaces this test source with a stub.