test(hid): test_pads_after_menu stubs LoadLibraryExA, which nn_hid.c loads XInput with since 39484b83 #1011

Open
d4nkn3ss wants to merge 1 commit from d4nkn3ss/Longshot:test/pads-after-menu-loadlibraryex into main
Contributor

Type: test · Risk: low · Tested on: Windows 11, RTX 3080 · Needs: none

Why

test_pads_after_menu fails on main on every OS, before checking anything. It checks that the pads go back to the game after the Insert menu closes. It compiles host/nn_hid.c's pad reading against a stand-in for Windows' calls, and since 39484b83 ("load XInput and IMM32 from System32") that code loads xinput1_4.dll with LoadLibraryExA(..., LOAD_LIBRARY_SEARCH_SYSTEM32). The stand-in only had LoadLibraryA, so the compile stops with call to undeclared function 'LoadLibraryExA'. I searched the open PRs for the check's name; #823, #822 and others only list it among main's failures.

What changed

The stand-in gets LoadLibraryExA and the flag's value. Like its LoadLibraryA, it returns no module (no XInput: SDL has the pads). The cases are unchanged.

  • tests: tests/test_pads_after_menu.py PRELUDE: #define LOAD_LIBRARY_SEARCH_SYSTEM32 0x800 and static HMODULE LoadLibraryExA(const char *, void *, DWORD).

Measurements

Verdict: nothing to measure: a check only. It fails on main and passes here.

Flags and settings

None

Testing

Tested: python -I -B tests/run_all.py from PowerShell on Windows 11, with llvm-mingw from the Longshot Builder.

main @ 1764fed2 this PR @ c73e8116
test_pads_after_menu FAIL: call to undeclared function 'LoadLibraryExA', use of undeclared identifier 'LOAD_LIBRARY_SEARCH_SYSTEM32' pass
run_all.py in all 598 passed, 19 failed, 42 skipped 599 passed, 18 failed, 42 skipped

The 18 left fail on main too: test_auto_handheld, test_bug_report_defaults, test_crash_dialog, test_crt_options, test_fsr_uniform_ownership, test_guest_imported, test_import_reach, test_linux_preflight, test_make_game_cache, test_missing_nup, test_parallel_init_order, test_pending_guest_import, test_release, test_replay_write_order, test_run_all_changed, test_tested_configurations, test_vk_occlusion_queries, test_walk_key. Some have open PRs: #1009, #1007, #1006, #1003, #993, #999, #592, #144, #954, #937 and #537.

Not tested: Linux and macOS. The stand-in is the whole of Windows there (run_all builds the check with gcc), and the error was an undeclared function, the same on every compiler.

Must be tested: None. The change is to a check only.

Risks

What could break: nothing in the game: only tests/ changes.

Turning it off: revert the commit.

Compatibility: Nothing changes.

Issues

None found: the change that moved nn_hid.c to LoadLibraryExA is 39484b83.

Checklist

Everyone

  • One topic.
  • The title is a Conventional Commit (type(scope): description) of the status line's type.
  • Why gives the reason plainly and links the issues that fit (the tracker searched).
  • Measurements has a verdict, or one line saying why there is nothing to measure.
  • Testing names what was tested, what wasn't, and what must still be tested, where and how.
  • Rebased on current main.
  • python -I -B tests/run_all.py passes (any failure that also fails on main is named).
  • No game files, dumps, build output or generated files.
  • third_party/ untouched (a new folder with a PROVENANCE.md instead).
  • The license is OK: GPL-3.0-or-later, nothing incompatible and nothing decompiled.

When it applies

  • AI assistance recorded with Assisted-by: / Co-Authored-By: trailers.
  • A check under tests/ that reads changed source updated in this PR, not weakened.

🤖 Generated with Claude Code

**Type:** test · **Risk:** low · **Tested on:** Windows 11, RTX 3080 · **Needs:** none ## Why `test_pads_after_menu` fails on main on every OS, before checking anything. It checks that the pads go back to the game after the Insert menu closes. It compiles `host/nn_hid.c`'s pad reading against a stand-in for Windows' calls, and since 39484b83 ("load XInput and IMM32 from System32") that code loads `xinput1_4.dll` with `LoadLibraryExA(..., LOAD_LIBRARY_SEARCH_SYSTEM32)`. The stand-in only had `LoadLibraryA`, so the compile stops with `call to undeclared function 'LoadLibraryExA'`. I searched the open PRs for the check's name; #823, #822 and others only list it among main's failures. ## What changed The stand-in gets `LoadLibraryExA` and the flag's value. Like its `LoadLibraryA`, it returns no module (no XInput: SDL has the pads). The cases are unchanged. - tests: `tests/test_pads_after_menu.py` `PRELUDE`: `#define LOAD_LIBRARY_SEARCH_SYSTEM32 0x800` and `static HMODULE LoadLibraryExA(const char *, void *, DWORD)`. ## Measurements **Verdict:** nothing to measure: a check only. It fails on main and passes here. ### Flags and settings None ## Testing **Tested:** `python -I -B tests/run_all.py` from PowerShell on Windows 11, with llvm-mingw from the Longshot Builder. | | main @ 1764fed2 | this PR @ c73e8116 | |---|---|---| | `test_pads_after_menu` | FAIL: `call to undeclared function 'LoadLibraryExA'`, `use of undeclared identifier 'LOAD_LIBRARY_SEARCH_SYSTEM32'` | pass | | `run_all.py` in all | 598 passed, 19 failed, 42 skipped | 599 passed, 18 failed, 42 skipped | The 18 left fail on main too: `test_auto_handheld`, `test_bug_report_defaults`, `test_crash_dialog`, `test_crt_options`, `test_fsr_uniform_ownership`, `test_guest_imported`, `test_import_reach`, `test_linux_preflight`, `test_make_game_cache`, `test_missing_nup`, `test_parallel_init_order`, `test_pending_guest_import`, `test_release`, `test_replay_write_order`, `test_run_all_changed`, `test_tested_configurations`, `test_vk_occlusion_queries`, `test_walk_key`. Some have open PRs: #1009, #1007, #1006, #1003, #993, #999, #592, #144, #954, #937 and #537. **Not tested:** Linux and macOS. The stand-in is the whole of Windows there (run_all builds the check with gcc), and the error was an undeclared function, the same on every compiler. **Must be tested:** None. The change is to a check only. ## Risks **What could break:** nothing in the game: only `tests/` changes. **Turning it off:** revert the commit. **Compatibility:** Nothing changes. ## Issues None found: the change that moved nn_hid.c to LoadLibraryExA is 39484b83. ## Checklist ### Everyone - [x] One topic. - [x] The title is a Conventional Commit (`type(scope): description`) of the status line's type. - [x] Why gives the reason plainly and links the issues that fit (the tracker searched). - [x] Measurements has a verdict, or one line saying why there is nothing to measure. - [x] Testing names what was tested, what wasn't, and what must still be tested, where and how. - [x] Rebased on current `main`. - [x] `python -I -B tests/run_all.py` passes (any failure that also fails on `main` is named). - [x] No game files, dumps, build output or generated files. - [x] `third_party/` untouched (a new folder with a `PROVENANCE.md` instead). - [x] The license is OK: GPL-3.0-or-later, nothing incompatible and nothing decompiled. ### When it applies - [x] AI assistance recorded with `Assisted-by:` / `Co-Authored-By:` trailers. - [x] A check under `tests/` that reads changed source updated in this PR, not weakened. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
test(hid): test_pads_after_menu stubs LoadLibraryExA, which nn_hid.c loads XInput with since 39484b83
Some checks are pending
CI / Conventional Commit title (pull_request) Blocked by required conditions
CI / Python source checks (ubuntu-24.04, part 1/2) (pull_request) Blocked by required conditions
CI / Python source checks (ubuntu-24.04, part 2/2) (pull_request) Blocked by required conditions
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Blocked by required conditions
CI / Workflow lint (actionlint) (pull_request) Blocked by required conditions
Guide screenshots / Guide images and local UI source review (pull_request) Blocked by required conditions
Third-party parts / As their notes say (pull_request) Blocked by required conditions
Third-party parts / The same as upstream (pull_request) Blocked by required conditions
Website / Website on Cloudflare (pull_request_target) Has been skipped
PR description / Description follows the template (pull_request_target) Successful in 3s
c73e81169f
test_pads_after_menu compiles nn_hid.c's pad reading against a stand-in
for Windows' calls. Since 39484b83 ("load XInput and IMM32 from System32")
that code loads xinput1_4.dll with LoadLibraryExA(...,
LOAD_LIBRARY_SEARCH_SYSTEM32), which the stand-in did not have, so the
check failed to compile on every OS. It gets one that returns no module,
as its LoadLibraryA does (no XInput: SDL has the pads), and the flag's
value. The cases are unchanged.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
d4nkn3ss changed title from WIP: test(hid): test_pads_after_menu stubs LoadLibraryExA, which nn_hid.c loads XInput with since 39484b83 to test(hid): test_pads_after_menu stubs LoadLibraryExA, which nn_hid.c loads XInput with since 39484b83 2026-11-16 02:15:08 +00:00
Some checks are pending
CI / Conventional Commit title (pull_request) Blocked by required conditions
CI / Python source checks (ubuntu-24.04, part 1/2) (pull_request) Blocked by required conditions
CI / Python source checks (ubuntu-24.04, part 2/2) (pull_request) Blocked by required conditions
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Blocked by required conditions
CI / Workflow lint (actionlint) (pull_request) Blocked by required conditions
Guide screenshots / Guide images and local UI source review (pull_request) Blocked by required conditions
Third-party parts / As their notes say (pull_request) Blocked by required conditions
Third-party parts / The same as upstream (pull_request) Blocked by required conditions
Website / Website on Cloudflare (pull_request_target) Has been skipped
PR description / Description follows the template (pull_request_target) Successful in 3s
This pull request doesn't have enough approvals yet. 0 of 1 approvals granted.
Some workflows are waiting to be reviewed.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u 'test/pads-after-menu-loadlibraryex:d4nkn3ss-test/pads-after-menu-loadlibraryex'
git switch 'd4nkn3ss-test/pads-after-menu-loadlibraryex'
Sign in to join this conversation.
No reviewers
No milestone
No project
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.

Dependencies

No dependencies set

Reference
MagicBeanDev/Longshot!1011
No description provided.