fix(savedata): report memory metadata write failures #312

Merged
RomainROCH merged 2 commits from upstream-pr/312 into main 2026-10-04 01:13:01 +00:00
RomainROCH commented 2026-10-02 04:08:52 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by RomainROCH on 2026-10-02T04:08:52Z.


What

Return SAVE_DATA_ERROR_INTERNAL when setSaveDataMemory2 cannot write the metadata sidecar, instead of reporting success. The regression blocks creation of the temporary sidecar, checks the error and preservation of previous metadata, then verifies cleanup, a successful retry and a call without metadata.

Updated onto main 7d40a57, retaining the memory-growth and replacement regression tests. The metadata fixture now checks that the replacement helper removes the temporary path after a write failure.

Tested

  • Commit: 1a55adfee2.
  • Focused Windows save-data tests: Windows Release/Ninja, WinLibs GCC 16.1.0: all 6 save-data tests passed three consecutive repetitions (18/18 executions). The merged metadata fixture failed before its cleanup assertion was adapted and passed afterwards. This is separate from the supported workflow toolchain..
  • Full current Linux/Windows Build workflow on the authorized fork: https://github.com/RomainROCH/AnyPS5/actions/runs/37071313926 (passed on this commit; full build and libs target on both platforms; three repetitions for passing tests). Linux GCC 13.3.0: 124 passed, 2 skipped, 0 failed out of 126 tests. Windows WinLibs GCC 15.2.0: 116 passed, 11 skipped, 0 failed out of 127 tests.
  • Upstream PR checks: https://github.com/boykopovar/AnyPS5/actions/runs/37071265405. Windows passed. Linux build and libs passed; CTest had 123 passed, 2 skipped and 1 failed (agc_driver_vopc_compare: thread 1, compare 39, received 0 instead of 1). All six save-data tests passed. The AGC source and workflow are unchanged by this PR; the same commit passed on the fork. The cause of this non-reproduced GPU failure is not established. The upstream Linux check remains failed and needs a maintainer rerun; the fork result does not replace that status.
  • Upstream Progress report: https://github.com/boykopovar/AnyPS5/actions/runs/37071265402 (passed).
  • Synthetic filesystem fixtures only; no game or homebrew compatibility tested. No separate focused relinker run.

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 added
  • No new unimplemented paths or silent stubs
  • No investigation notes or images added to the repository
  • No new third-party code
  • Generic behaviour, not specific to one title
  • Depends on: none
  • AI-assisted: yes
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4712571185 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/312). Originally posted by [RomainROCH](https://github.com/RomainROCH) on 2026-10-02T04:08:52Z. --- ### What Return SAVE_DATA_ERROR_INTERNAL when setSaveDataMemory2 cannot write the metadata sidecar, instead of reporting success. The regression blocks creation of the temporary sidecar, checks the error and preservation of previous metadata, then verifies cleanup, a successful retry and a call without metadata. Updated onto main 7d40a57, retaining the memory-growth and replacement regression tests. The metadata fixture now checks that the replacement helper removes the temporary path after a write failure. ### Tested - Commit: 1a55adfee2a1aac975ae6ac2ae4d133803451aa7. - Focused Windows save-data tests: Windows Release/Ninja, WinLibs GCC 16.1.0: all 6 save-data tests passed three consecutive repetitions (18/18 executions). The merged metadata fixture failed before its cleanup assertion was adapted and passed afterwards. This is separate from the supported workflow toolchain.. - Full current Linux/Windows Build workflow on the authorized fork: https://github.com/RomainROCH/AnyPS5/actions/runs/37071313926 (passed on this commit; full build and `libs` target on both platforms; three repetitions for passing tests). Linux GCC 13.3.0: 124 passed, 2 skipped, 0 failed out of 126 tests. Windows WinLibs GCC 15.2.0: 116 passed, 11 skipped, 0 failed out of 127 tests. - Upstream PR checks: https://github.com/boykopovar/AnyPS5/actions/runs/37071265405. Windows passed. Linux build and `libs` passed; CTest had 123 passed, 2 skipped and 1 failed (`agc_driver_vopc_compare`: thread 1, compare 39, received 0 instead of 1). All six save-data tests passed. The AGC source and workflow are unchanged by this PR; the same commit passed on the fork. The cause of this non-reproduced GPU failure is not established. The upstream Linux check remains failed and needs a maintainer rerun; the fork result does not replace that status. - Upstream Progress report: https://github.com/boykopovar/AnyPS5/actions/runs/37071265402 (passed). - Synthetic filesystem fixtures only; no game or homebrew compatibility tested. No separate focused relinker run. ### 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 added - [x] No new unimplemented paths or silent stubs - [x] No investigation notes or images added to the repository - [x] No new third-party code - [x] Generic behaviour, not specific to one title - [x] Depends on: none - [x] AI-assisted: yes
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!312
No description provided.