Skip to content

fix(tests): build and run the udata_close and _Quad tests on macOS - #28944

Merged
oneandonlydean merged 1 commit into
boykopovar:mainfrom
magnub:fix/macos-test-build-mincore-initializer-list
Dec 4, 2026
Merged

oneandonlydean merged 1 commit into
boykopovar:mainfrom
magnub:fix/macos-test-build-mincore-initializer-list

Conversation

@magnub

@magnub magnub commented Dec 4, 2026 •

Copy link
Copy Markdown
Contributor

What

Two test files merged on 4 December stopped the macOS test build:

Linux and Windows behaviour of both tests is unchanged.

Tested

Apple M1 Pro, macOS 27.0.1, Apple clang 21.0.0, x86_64 build under Rosetta 2, on main 2c43b61 with the macOS build fixes #11049, #26739, #27739, #27767, #27843 and #27639 merged locally so that main builds.

  • On main, the full build fails in exactly these two targets with the errors above.
  • With this change both targets build; guest_icu_recovered_signatures and guest_libc_internal_quad pass 3/3.
  • With mincore kept on macOS (only the vector type fixed), guest_icu_recovered_signatures fails at the first check that the mapping was released, which is why macOS uses msync.

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 and the licence notice of code adapted from upstream (see AGENTS.md)
  • 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

🤖 Generated with Claude Code

https://claude.ai/code/session_012LL9hfx4BY6MbUCYMduDAQ

Summary by CodeRabbit

  • Tests
    • Improved cross-platform checks for memory-mapping lifecycle tests, including on macOS.
    • Updated a test’s required standard library include.

@coderabbitai

coderabbitai Bot commented Dec 4, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

Changes: DataMemoryClose Mapping Checks

Layer / File(s) Summary
Platform-specific mapping status
core/libs/prx/libSceIcu/tests/DataMemoryClose.cpp
The new Mapped helper uses msync on macOS and mincore on other non-Windows platforms. Mapping lifecycle tests use the helper to check whether mappings remain accessible or have been released.

GuestLibcInternalQuad Header

Layer / File(s) Summary
Initializer-list include
core/libs/tests/GuestLibcInternalQuad.cpp
The test file adds the <initializer_list> header.

Possibly related issues

  • Issue 24117 — It describes macOS test failures associated with mincore checks in DataMemoryClose; this change updates those checks but does not add the proposed macOS CI job.

Possibly related PRs

  • boykopovar/AnyPS5#25432 — It changes the trusted close path to unmap the recorded mapping; this PR’s mapping-release tests check that behavior.

Suggested reviewers: amazedturnip, thimo188, marczx10

Change: Other

Merge Risk: Minimal · up to 36f09

This change only adjusts tests to build and verify correctly on macOS and adds a missing standard header. It does not affect production behavior, so merge risk is minimal.

Security architecture risk: Minimal · up to 36f09

The ICU tests use a macOS-compatible check to verify that mappings were released, and the _Quad tests add a missing standard header. Neither change alters production behavior.

Finishing Touches

Generate unit tests (beta)

  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: f6096045-8b8d-4652-b235-22a9aa98a355
Commits

Reviewing files that changed from the base of the PR and between c2fee7f and 36f09cd.

Files selected for processing: 2

  • core/libs/prx/libSceIcu/tests/DataMemoryClose.cpp
  • core/libs/tests/GuestLibcInternalQuad.cpp

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.

@github-actions github-actions Bot added the prx label Dec 4, 2026

@MarcZX10 MarcZX10 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed — looks good

The two changed test files appear correct at head 36f09cd317e4f221bc73aa17de94ba6074ac85d1; both were read, and no build or test was run.

What I ran

Read the prepared diff and both changed files, then inspected the close implementation and ownership declarations at the pinned head. Read 2 of 2 reviewed files; files.json lists no excluded files. No build or test command was run.

python3 repo_read.py cat core/libs/prx/libSceIcu/DataMemoryClose.cpp 1 150
python3 repo_read.py cat core/libs/prx/libSceIcu/DataMemoryOwnership.hpp 1 220
python3 repo_read.py search 'GuestLibcInternalQuad' core/libs

Results

Check Result Note
Changed source review passed Both changed files read
Build and tests not run No non-compiling check was established

Findings

Blocking

None.

Non-blocking

None.

Sources

The new helper selects msync on Apple platforms and keeps mincore elsewhere; the close implementation uses registered mapping metadata when closing trusted objects. Changed ICU test, close implementation, changed quad test.

Not verified

The reported macOS build and test results were not independently reproduced. Windows and Linux execution was not run.

To get this to a good state

No follow-up is required.

@oneandonlydean
oneandonlydean merged commit 5cbfc40 into boykopovar:main Dec 4, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants