fix(agc): set the lease mirror switch with _putenv_s on Windows in the upload cache test #22366

Closed
oneandonlydean wants to merge 1 commit from upstream-pr/22366 into main
oneandonlydean commented 2026-11-17 12:56:14 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-11-17T12:56:14Z.


The upload cache read-only flush test called POSIX setenv unconditionally, so a Windows build with BUILD_TESTING=ON stops on 'setenv' was not declared in this scope. It now uses _putenv_s on Windows, the same pattern Graphics.cpp already uses for the same switch (APS5_NO_LEASE_MIRROR).

Fixes #22358

Test: the change is the compile of agc_driver_upload_cache_read_only_flush_tests on Windows, which fails on main (reporter's log, e369d932fd) and builds with this change. I could not build on Windows here; the Linux branch of the code is unchanged.

AI-assisted: yes

<!-- greyfinch-sync:boykopovar/AnyPS5:issue:5357239978 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/22366). Originally posted by [oneandonlydean](https://github.com/oneandonlydean) on 2026-11-17T12:56:14Z. --- The upload cache read-only flush test called POSIX setenv unconditionally, so a Windows build with BUILD_TESTING=ON stops on `'setenv' was not declared in this scope`. It now uses `_putenv_s` on Windows, the same pattern Graphics.cpp already uses for the same switch (APS5_NO_LEASE_MIRROR). Fixes #22358 Test: the change is the compile of agc_driver_upload_cache_read_only_flush_tests on Windows, which fails on main (reporter's log, e369d932fd) and builds with this change. I could not build on Windows here; the Linux branch of the code is unchanged. AI-assisted: yes
MarcZX10 commented 2026-11-23 01:59:45 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-23T01:59:45Z.

Review: APPROVED


Reviewed — looks good

Nothing in the reviewed change blocks merging; it mirrors the existing platform-specific environment setup in Graphics.cpp, and the change is limited to the test's Windows branch.

What I ran

Reviewed head 89b4f265050c77f77977489f788c99bb8cbc680c using the prepared diff and pinned repository reader. No build or test command was run; the author reports a Windows build but says they could not build it locally.

Results

Check Result Note
Diff and changed source passed One changed test file
Targeted context passed Environment setup pattern matches
Build or tests not run Windows build is author-reported

Findings

Blocking

None.

Non-blocking

None.

Not verified

No build or runtime tests were run, including on Windows. Read: description.md, commits.md, manifest.json, diff.patch, and core/libs/prx/libSceAgcDriver/tests/execution/UploadCacheReadOnlyFlush.cpp (full file). The only changed file is included in the manifest; files.json was not supplied in the reader listing.

To get this to a good state

Nothing is required.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:6015778935 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/22366#pullrequestreview-6015778935). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-11-23T01:59:45Z. **Review:** APPROVED --- # Reviewed — looks good Nothing in the reviewed change blocks merging; it mirrors the existing platform-specific environment setup in Graphics.cpp, and the change is limited to the test's Windows branch. ## What I ran Reviewed head `89b4f265050c77f77977489f788c99bb8cbc680c` using the prepared diff and pinned repository reader. No build or test command was run; the author reports a Windows build but says they could not build it locally. ## Results | Check | Result | Note | |---|---|---| | Diff and changed source | passed | One changed test file | | Targeted context | passed | Environment setup pattern matches | | Build or tests | not run | Windows build is author-reported | ## Findings ### Blocking None. ### Non-blocking None. ## Not verified No build or runtime tests were run, including on Windows. Read: `description.md`, `commits.md`, `manifest.json`, `diff.patch`, and `core/libs/prx/libSceAgcDriver/tests/execution/UploadCacheReadOnlyFlush.cpp` (full file). The only changed file is included in the manifest; `files.json` was not supplied in the reader listing. ## To get this to a good state Nothing is required.

Pull request closed

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!22366
No description provided.