test(libkernel): run nid_patcher_symbol_versions on Windows #8717

Merged
xXPBSXx merged 1 commit from upstream-pr/8717 into main 2026-10-24 12:50:06 +00:00
xXPBSXx commented 2026-10-20 22:01:35 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by xXPBSXx on 2026-10-20T22:01:35Z.


What

nid_patcher_symbol_versions was registered inside the if(Python3_Interpreter_FOUND AND NOT WIN32) block of core/libs/prx/libkernel/CMakeLists.txt that also adds nid_patcher_dynamic_strings, so it never ran on Windows. test_symbol_versions.py only writes a synthetic ELF and runs nid_patcher on it (no host loader involved); only test_dynamic_strings.py reads the ELF fixture module (guest_module_fixture), which is a PE DLL on Windows. The -Wl,--no-as-needed fixture option and the dynamic strings test stay non-Windows; the symbol versions test is now registered on every host.

git merge-tree against upstream/main is clean. pr_overlap was not run.

Tested

Windows 10 (19045), MinGW-w64 GCC 15.2.0, Release:

  • ctest -N -R "^nid_patcher_(symbol_versions|dynamic_strings)$" lists exactly nid_patcher_symbol_versions (the dynamic strings test stays unregistered on Windows).
  • Before (upstream/main): not registered on Windows (NOT WIN32). After: nid_patcher_symbol_versions passes 3 of 3 runs (5.5-6.5 s); run by hand it prints NID patcher symbol version tests passed. This is coverage only, so there is no red state without the change.
  • python tools/check_conventions.py --base upstream/main: passes.
  • Not tested: Linux/macOS (the test was registered there before and still is), a console.

Rebased onto main 1e20650e84 (head 2264b7bbca; main had moved find_package(Python3 ...) up in core/libs/prx/libkernel/CMakeLists.txt, so the Python3_Interpreter_FOUND block was merged again, with the same lines changed as before).

  • Windows 10 19045, MinGW-w64 GCC 15.2.0, Release: CMake configures with no error, nid_patcher_symbol_versions is registered on Windows and ctest -R '^nid_patcher_symbol_versions$' passes 3 of 3 runs. No red run is possible: on main the test is compiled out on Windows (inside NOT WIN32).
  • Linux (WSL2 Ubuntu 24.04, virtualised kernel, not bare-metal), same head and base: CMake configures with no error; nid_patcher_macho, nid_patcher_native_paths, nid_patcher_dynamic_strings (still registered, fixture linked with --no-as-needed) and nid_patcher_symbol_versions pass, 4 of 4.
  • python tools/check_conventions.py --base upstream/main: no finding. Not tested: macOS.

Checklist

  • Based on current main; no other open PR implements the same functions
  • One topic per PR; follow-ups go in a new PR
  • No comments in code except technical debt
  • Unimplemented paths throw; no silent stubs added
  • No notes, investigation .md files or images added to the repository
  • New third-party code is a submodule built from source (none added)
  • Generic behaviour, not specific to one title
  • Depends on: none
  • Fixes: none
  • Unblocks: none
  • AI-assisted: yes

AI-assisted (Claude Code).

🤖 Generated with Claude Code

<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4943100141 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/8717). Originally posted by [xXPBSXx](https://github.com/xXPBSXx) on 2026-10-20T22:01:35Z. --- ### What `nid_patcher_symbol_versions` was registered inside the `if(Python3_Interpreter_FOUND AND NOT WIN32)` block of `core/libs/prx/libkernel/CMakeLists.txt` that also adds `nid_patcher_dynamic_strings`, so it never ran on Windows. `test_symbol_versions.py` only writes a synthetic ELF and runs `nid_patcher` on it (no host loader involved); only `test_dynamic_strings.py` reads the ELF fixture module (`guest_module_fixture`), which is a PE DLL on Windows. The `-Wl,--no-as-needed` fixture option and the dynamic strings test stay non-Windows; the symbol versions test is now registered on every host. `git merge-tree` against `upstream/main` is clean. `pr_overlap` was not run. ### Tested Windows 10 (19045), MinGW-w64 GCC 15.2.0, Release: - `ctest -N -R "^nid_patcher_(symbol_versions|dynamic_strings)$"` lists exactly `nid_patcher_symbol_versions` (the dynamic strings test stays unregistered on Windows). - Before (upstream/main): not registered on Windows (`NOT WIN32`). After: `nid_patcher_symbol_versions` passes 3 of 3 runs (5.5-6.5 s); run by hand it prints `NID patcher symbol version tests passed`. This is coverage only, so there is no red state without the change. - `python tools/check_conventions.py --base upstream/main`: passes. - Not tested: Linux/macOS (the test was registered there before and still is), a console. Rebased onto `main` `1e20650e84` (head `2264b7bbca`; `main` had moved `find_package(Python3 ...)` up in `core/libs/prx/libkernel/CMakeLists.txt`, so the `Python3_Interpreter_FOUND` block was merged again, with the same lines changed as before). - Windows 10 19045, MinGW-w64 GCC 15.2.0, Release: CMake configures with no error, `nid_patcher_symbol_versions` is registered on Windows and `ctest -R '^nid_patcher_symbol_versions$'` passes 3 of 3 runs. No red run is possible: on `main` the test is compiled out on Windows (inside `NOT WIN32`). - Linux (WSL2 Ubuntu 24.04, virtualised kernel, not bare-metal), same head and base: CMake configures with no error; `nid_patcher_macho`, `nid_patcher_native_paths`, `nid_patcher_dynamic_strings` (still registered, fixture linked with `--no-as-needed`) and `nid_patcher_symbol_versions` pass, 4 of 4. - `python tools/check_conventions.py --base upstream/main`: no finding. Not tested: macOS. ### Checklist - [x] Based on current `main`; no other open PR implements the same functions - [x] One topic per PR; follow-ups go in a new PR - [x] No comments in code except technical debt - [x] Unimplemented paths throw; no silent stubs added - [x] No notes, investigation `.md` files or images added to the repository - [x] New third-party code is a submodule built from source (none added) - [x] Generic behaviour, not specific to one title - [x] Depends on: none - [x] Fixes: none - [x] Unblocks: none - [x] AI-assisted: yes AI-assisted (Claude Code). 🤖 Generated with [Claude Code](https://claude.com/claude-code)
MarcZX10 commented 2026-10-20 22:18:02 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-20T22:18:02Z.


The test registration change looks functionally compatible with the same-file edits in #8658 (macOS dynamic-strings linker flag) and #6586 (Linux runtime-lifecycle test registration). The overlap bot is still flagging core/libs/prx/libkernel/CMakeLists.txt, and this PR notes that pr_overlap was not run. Could you record the exact merge-tree/combined CMake check for these heads, or note the intended rebase/order? In particular, the symbol-version test should remain registered on Windows while dynamic-strings stays non-Windows and the --no-as-needed flag stays off macOS.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6303029041 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/8717#issuecomment-6303029041). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-20T22:18:02Z. --- The test registration change looks functionally compatible with the same-file edits in #8658 (macOS dynamic-strings linker flag) and #6586 (Linux runtime-lifecycle test registration). The overlap bot is still flagging `core/libs/prx/libkernel/CMakeLists.txt`, and this PR notes that `pr_overlap` was not run. Could you record the exact merge-tree/combined CMake check for these heads, or note the intended rebase/order? In particular, the symbol-version test should remain registered on Windows while dynamic-strings stays non-Windows and the `--no-as-needed` flag stays off macOS.
MarcZX10 commented 2026-10-20 22:30:09 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-20T22:30:09Z.


I checked the current CMake hunks in #6586 and #8658 against this PR. #6586 moves the Python discovery earlier but leaves Python3_Interpreter_FOUND available in this block; #8658 nests the --no-as-needed link option under NOT APPLE; this PR then keeps nid_patcher_dynamic_strings under NOT WIN32 while registering nid_patcher_symbol_versions for every host with Python. The combined conditions preserve the intended Windows/macOS behavior, and the hunks are compatible by inspection. I have not run a combined CMake configure/build; hosted build jobs are skipped on this PR.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6303219827 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/8717#issuecomment-6303219827). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-20T22:30:09Z. --- I checked the current CMake hunks in #6586 and #8658 against this PR. #6586 moves the Python discovery earlier but leaves `Python3_Interpreter_FOUND` available in this block; #8658 nests the `--no-as-needed` link option under `NOT APPLE`; this PR then keeps `nid_patcher_dynamic_strings` under `NOT WIN32` while registering `nid_patcher_symbol_versions` for every host with Python. The combined conditions preserve the intended Windows/macOS behavior, and the hunks are compatible by inspection. I have not run a combined CMake configure/build; hosted build jobs are skipped on this PR.
xXPBSXx commented 2026-10-20 22:33:53 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by xXPBSXx on 2026-10-20T22:33:53Z.


Thanks for checking the CMake conditions. I ran git merge-tree of this head against the heads of #8658 and #6586 now: each pair has one textual conflict in core/libs/prx/libkernel/CMakeLists.txt (the same block), while #8658 and #6586 do not conflict with each other. So your reading of the conditions matches, but the hunks do not merge without a manual step. This change is small (6 added, 4 removed lines), so I will rebase it onto whichever of the two lands first, keeping nid_patcher_symbol_versions registered for every host with Python, nid_patcher_dynamic_strings under NOT WIN32 and the --no-as-needed option off macOS. I have not run a combined CMake configure or build of the three heads.

AI-assisted (Claude Code).

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6303278245 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/8717#issuecomment-6303278245). Originally posted by [xXPBSXx](https://github.com/xXPBSXx) on 2026-10-20T22:33:53Z. --- Thanks for checking the CMake conditions. I ran `git merge-tree` of this head against the heads of #8658 and #6586 now: each pair has one textual conflict in `core/libs/prx/libkernel/CMakeLists.txt` (the same block), while #8658 and #6586 do not conflict with each other. So your reading of the conditions matches, but the hunks do not merge without a manual step. This change is small (6 added, 4 removed lines), so I will rebase it onto whichever of the two lands first, keeping `nid_patcher_symbol_versions` registered for every host with Python, `nid_patcher_dynamic_strings` under `NOT WIN32` and the `--no-as-needed` option off macOS. I have not run a combined CMake configure or build of the three heads. AI-assisted (Claude Code).
JJenkx commented 2026-10-22 13:26:49 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by JJenkx on 2026-10-22T13:26:49Z.


Independent Windows run, as data only. Machine: Windows 11 Enterprise 10.0.22621, Ryzen 9 5950X, WinLibs GCC 15.2.0 UCRT r7, Release, BUILD_TESTING=ON, Python 3.15. #8654 (c318c70b69), #8717 (ba9e424a42) and #9000 (78bfaba736) were merged together onto main 830ccd121f, without conflicts, and each test was run 3 times. nid_patcher_symbol_versions passes 3 of 3.

AI-assisted (Claude Code).

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6341917213 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/8717#issuecomment-6341917213). Originally posted by [JJenkx](https://github.com/JJenkx) on 2026-10-22T13:26:49Z. --- Independent Windows run, as data only. Machine: Windows 11 Enterprise 10.0.22621, Ryzen 9 5950X, WinLibs GCC 15.2.0 UCRT r7, Release, `BUILD_TESTING=ON`, Python 3.15. #8654 (c318c70b69), #8717 (ba9e424a42) and #9000 (78bfaba736) were merged together onto `main` 830ccd121f, without conflicts, and each test was run 3 times. `nid_patcher_symbol_versions` passes 3 of 3. AI-assisted (Claude Code).
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
boykopovar/AnyPS5!8717
No description provided.