build: Windows test executables named with setup or update need elevation, so ctest never runs them #16293
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?
Imported from boykopovar/AnyPS5. Originally posted by AlfaRojo on 2026-11-06T05:59:31Z.
What happens
On a Windows host with UAC enabled, five test executables never run: ctest reports them as
BAD_COMMAND(***Not Run), and running one from a shell fails with "requires elevation" (bash printsPermission denied). Launching it from a console that honours the elevation prompt starts it elevated, and the elevated process has noPATHto the libraries, so it stops withlibSceAgc.prx was not foundand the Program Compatibility Assistant then asks whether the "program installed correctly".Cause
Windows installer detection: an executable without an application manifest whose file name contains
install,setuporupdateis treated as an installer and needs elevation. None of the test executables embeds a manifest (objdump -hshows no.rsrc; the WinLibs toolchain ships nodefault-manifest.o), and these five file names match:agc_draw_setup_tests.exe(testagc_draw_setup, since4ad61bf3ce)guest_update_env_tests.exeguest_gameupdate_tests.exeguest_hmd_setup_dialog_tests.exeguest_vr_setup_dialog_tests.exeA copy of
agc_draw_setup_tests.exerenamed toagc_draw_renamed_tests.exeruns as a normal user and passes withbuild/core/libs/libs/unpatchedonPATH. Tests whose name contains the words but whose executable does not (guest_standard_streams_update_stdout,guest_ult_thread_lifecycle_cleanup-setup) run fine.The hosted Windows check runs elevated on
windows-latest, so CI never sees it; a developer runningcteston their own machine does.Title, test or build step
ctest --test-dir build -R '^(agc_draw_setup|guest_hmd_setup_dialog|guest_vr_setup_dialog|guest_update_env|guest_gameupdate)$'AnyPS5 commit
main6a37dfbed9System
Windows 11 Pro 10.0.26200, UAC on, standard (non-elevated) console; WinLibs GCC 15.2.0 r7 UCRT, Ninja, Release,
BUILD_TESTING=ON. Found while runningctest -R '^agc_'on an RTX 4070 and a Radeon1002:13c0: these were the only failures besides #15564, #15566 and #9507.Fix
Embed a
requestedExecutionLevel level="asInvoker"manifest in every executable fromadd_test_executable(a resource compiled bywindres), and a ctest that checks every executable in the test output directory carries one, so a future name does not regress silently. Branch ready: https://github.com/AlfaRojo/AnyPS5/commits/fix/windows-test-exe-manifest; I will open it as a PR when my open-PR slot frees (#16274 is in it).AI-assisted: yes.