tests: link the kernel filesystem test on Windows #565

Closed
github-bot wants to merge 1 commit from gh-pr/565/head into gh-pr/565/base
Owner

@⁠psnwd on GitHub · 2026-09-11 16:47 UTC · original
psnwd:fix/kernel-fs-peek-waitall → main · +2 −0 · 1 files · 1 commits · closed without merging

SDL_main.h rewrites main() to SDL_main() on Windows, and nothing links SDL2main, so the test failed to link with "undefined symbol: main" and the executable was never produced. ctest then reported "Could not find executable" rather than a failure, which is how a red test went unnoticed on main.

Define SDL_MAIN_HANDLED ahead of the SDL include; the test drives SDL itself and does not want the rewrite. With the executable building again the failure reported in #505 reproduces: guest PEEK and WAITALL do not preserve the wake bytes, and the test exits 0xc0000409. That fix is not part of this change.

issue: #505

**@⁠psnwd** on GitHub · 2026-09-11 16:47 UTC · [original](https://github.com/KytyPS5/KytyPS5/pull/565) `psnwd:fix/kernel-fs-peek-waitall` → `main` · +2 −0 · 1 files · 1 commits · closed without merging SDL_main.h rewrites main() to SDL_main() on Windows, and nothing links SDL2main, so the test failed to link with "undefined symbol: main" and the executable was never produced. ctest then reported "Could not find executable" rather than a failure, which is how a red test went unnoticed on main. Define SDL_MAIN_HANDLED ahead of the SDL include; the test drives SDL itself and does not want the rewrite. With the executable building again the failure reported in #505 reproduces: guest PEEK and WAITALL do not preserve the wake bytes, and the test exits 0xc0000409. That fix is not part of this change. issue: #505
SDL_main.h rewrites main() to SDL_main() on Windows, and nothing links
SDL2main, so the test failed to link with "undefined symbol: main" and the
executable was never produced. ctest then reported "Could not find
executable" rather than a failure, which is how a red test went unnoticed on
main.

Define SDL_MAIN_HANDLED ahead of the SDL include; the test drives SDL itself
and does not want the rewrite. With the executable building again the failure
reported in #505 reproduces: guest PEEK and WAITALL do not preserve the wake
bytes, and the test exits 0xc0000409. That fix is not part of this change.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 09:25:57 +00:00
github-bot closed this pull request 2026-11-26 09:25:57 +00:00
Author
Owner

@⁠diegoalejandrogomez on GitHub · 2026-09-19 19:33 UTC · original

I reached this same conclusion in my pr #712 , since the flag is used in other platforms besides windows that are not in the scope of the project, I don't see the need of adding the guards as I did

**@⁠diegoalejandrogomez** on GitHub · 2026-09-19 19:33 UTC · [original](https://github.com/KytyPS5/KytyPS5/pull/565#issuecomment-5744732181) I reached this same conclusion in my pr #712 , since the flag is used in other platforms besides windows that are not in the scope of the project, I don't see the need of adding the guards as I did

Pull request closed

This discussion has been locked. Commenting is limited to contributors.
No description provided.