docs(build): point the antivirus note at the relinker tests' test-temp #8619

Merged
mantavisual merged 1 commit from upstream-pr/8619 into main 2026-10-24 09:31:11 +00:00
mantavisual commented 2026-10-20 18:37:33 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by mantavisual on 2026-10-20T18:37:33Z.


What

BUILD.md tells Windows users whose antivirus quarantines the relinker tests' executables to "Set TEMP and TMP to a directory the scanner excludes before running ctest". Since 39dd854c8 ("keep test artifacts in the build tree"), core/relinker/CMakeLists.txt sets TMPDIR, TEMP and TMP of every relinker test to core/relinker/test-temp in the build directory through ENVIRONMENT_MODIFICATION, so the variables set before ctest no longer reach these tests and the advice has no effect. The note now names that directory as the one to exclude.

It also lists windows_bss and windows_fixed_base, which run the executables they convert and fail the same way as the four already listed when the scanner blocks them.

Tested

Windows 11 Pro 23H2, WinLibs GCC 15.2.0 r7, Release, BUILD_TESTING=ON, a real-time antivirus scanner enabled.

  • No exclusion: optional_plt, empty_tls, windows_address_space, windows_bss, windows_fixed_base and windows_icon fail (the converted executable exits 0 with no output, or windows_address_space gets FileNotFoundError: [WinError 2] starting it). The scanner's alert named build\core\relinker\test-temp\anyps5-fixed-base-…\default\output.exe.
  • TMPDIR, TEMP and TMP set to an excluded directory before ctest, as the note said: the same six fail. ctest --show-only=json-v1 shows each relinker test's ENVIRONMENT_MODIFICATION setting the three variables to build/core/relinker/test-temp.
  • Only build\core\relinker\test-temp excluded: the six pass.
  • python3 tools/check_conventions.py --base origin/main passes. Only docs/dev/BUILD.md changes.

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 (NotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file
  • No notes, investigation .md files or images added to the repository (attach them to this PR)
  • New third-party code is a submodule built from source
  • Generic behaviour, not specific to one title
  • Depends on: none
  • Fixes: none
  • Unblocks: none
  • GPUs tested: n/a
  • AI-assisted: yes
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4940575892 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/8619). Originally posted by [mantavisual](https://github.com/mantavisual) on 2026-10-20T18:37:33Z. --- ### What BUILD.md tells Windows users whose antivirus quarantines the relinker tests' executables to "Set `TEMP` and `TMP` to a directory the scanner excludes before running `ctest`". Since 39dd854c8 ("keep test artifacts in the build tree"), `core/relinker/CMakeLists.txt` sets `TMPDIR`, `TEMP` and `TMP` of every relinker test to `core/relinker/test-temp` in the build directory through `ENVIRONMENT_MODIFICATION`, so the variables set before `ctest` no longer reach these tests and the advice has no effect. The note now names that directory as the one to exclude. It also lists `windows_bss` and `windows_fixed_base`, which run the executables they convert and fail the same way as the four already listed when the scanner blocks them. ### Tested Windows 11 Pro 23H2, WinLibs GCC 15.2.0 r7, Release, `BUILD_TESTING=ON`, a real-time antivirus scanner enabled. - No exclusion: `optional_plt`, `empty_tls`, `windows_address_space`, `windows_bss`, `windows_fixed_base` and `windows_icon` fail (the converted executable exits 0 with no output, or `windows_address_space` gets `FileNotFoundError: [WinError 2]` starting it). The scanner's alert named `build\core\relinker\test-temp\anyps5-fixed-base-…\default\output.exe`. - `TMPDIR`, `TEMP` and `TMP` set to an excluded directory before `ctest`, as the note said: the same six fail. `ctest --show-only=json-v1` shows each relinker test's `ENVIRONMENT_MODIFICATION` setting the three variables to `build/core/relinker/test-temp`. - Only `build\core\relinker\test-temp` excluded: the six pass. - `python3 tools/check_conventions.py --base origin/main` passes. Only `docs/dev/BUILD.md` changes. ### Checklist <!-- Rules behind each item: https://github.com/boykopovar/AnyPS5/blob/main/CONTRIBUTING.md --> - [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](https://github.com/boykopovar/AnyPS5/blob/main/docs/dev/CONVENTIONS.md) - [x] Unimplemented paths throw (`NotImplemented_nid_no_patch`); silent stubs are listed under Silent stubs in their library's [technical debt](https://github.com/boykopovar/AnyPS5/tree/main/docs/dev/debt) file - [x] No notes, investigation `.md` files or images added to the repository (attach them to this PR) - [x] New third-party code is a submodule built from source - [x] Generic behaviour, not specific to one title - [x] Depends on: none - [x] Fixes: none - [x] Unblocks: none - [x] GPUs tested: n/a - [x] AI-assisted: yes
harisibrar1 commented 2026-10-21 06:00:07 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by harisibrar1 on 2026-10-21T06:00:07Z.

Review: APPROVED


Checked against main:

  • core/relinker/CMakeLists.txt:827-831 creates <build>/core/relinker/test-temp and sets TMPDIR, TEMP and TMP to it with ENVIRONMENT_MODIFICATION on all relinker tests. Values exported before ctest are overridden, so the old "set TEMP and TMP" advice does not apply and naming that directory is correct.
  • windows_bss (CMakeLists.txt:538) and windows_fixed_base (:438) are registered before that block, so the directory applies to them. test_windows_bss.py:34,66 and test_windows_fixed_base.py:34,53 build the output in a tempfile directory and then run it, so listing them with the four already named is accurate.
  • tools/check_conventions.py --base main --head pr-8619 passes.

Reviewed with AI assistance (Claude Code); the checks above were run locally on my machine.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5595538946 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/8619#pullrequestreview-5595538946). Originally posted by [harisibrar1](https://github.com/harisibrar1) on 2026-10-21T06:00:07Z. **Review:** APPROVED --- Checked against main: - `core/relinker/CMakeLists.txt:827-831` creates `<build>/core/relinker/test-temp` and sets `TMPDIR`, `TEMP` and `TMP` to it with `ENVIRONMENT_MODIFICATION` on all relinker tests. Values exported before `ctest` are overridden, so the old "set `TEMP` and `TMP`" advice does not apply and naming that directory is correct. - `windows_bss` (`CMakeLists.txt:538`) and `windows_fixed_base` (`:438`) are registered before that block, so the directory applies to them. `test_windows_bss.py:34,66` and `test_windows_fixed_base.py:34,53` build the output in a `tempfile` directory and then run it, so listing them with the four already named is accurate. - `tools/check_conventions.py --base main --head pr-8619` passes. Reviewed with AI assistance (Claude Code); the checks above were run locally on my machine.
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!8619
No description provided.