fix(tests): name the raise-exception test's signal so macOS builds it #12076

Merged
011010 merged 1 commit from upstream-pr/12076 into main 2026-10-29 10:04:48 +00:00
011010 commented 2026-10-27 19:19:30 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by 011010 on 2026-10-27T19:19:30Z.


What

guest_raise_exception_tests stops a full macOS build with BUILD_TESTING=ON, and no open pull request covers it:

core/libs/tests/GuestRaiseException.cpp:21:22: error: expected unqualified-id
/Applications/Xcode.app/.../usr/include/sys/signal.h:122:17: note: expanded from macro 'SIGUSR1'

The test declares static constexpr int SIGUSR1 = 30; (from dd2890c1c5). On Windows and Linux that name is free in this translation unit; on macOS the SDK defines SIGUSR1 as a macro in <sys/signal.h>, which libc++ reaches through <stdlib.h> → <sys/wait.h>, so the declaration expands to static constexpr int 30 = 30;.

Rename it to GUEST_SIGUSR1, the name GuestPthreadCreateSuspended.cpp:18 and GuestSignalList.cpp:10-13 already use. The value and all 28 uses stay the same, so no behaviour changes. GuestRaiseNestedSleep.cpp has the same declaration but its target is inside if(WIN32) (libkernel/CMakeLists.txt:1205), so it never reaches a macOS build and is left alone.

Tested

  • macOS 27.0.1 (26A434), Apple M4, Apple clang 21.0.0, CMake 4.4.4, Ninja 1.13.2, x86-64 Release under Rosetta 2, main c547deaacb, -DBUILD_TESTING=ON -DCMAKE_OSX_ARCHITECTURES=x86_64.
    • Before, the same build directory: GuestRaiseException.cpp:21:22: error: expected unqualified-id, as quoted above.
    • After: the object builds clean, 26,392 bytes, 0 errors.
  • The test is not run. guest_raise_exception_tests still does not link on main: libkernel needs #7631, #7804, #10552 and #11249 to build on macOS, so this removes one object that stops the build and nothing more.
  • python3 tools/check_conventions.py --base origin/main: all conventions checks passed.
  • python3 tools/pr_overlap.py --branch fix/macos-raise-exception-signal-name: no overlap with open pull requests.

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:5039750605 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/12076). Originally posted by [011010](https://github.com/011010) on 2026-10-27T19:19:30Z. --- ### What `guest_raise_exception_tests` stops a full macOS build with `BUILD_TESTING=ON`, and no open pull request covers it: ``` core/libs/tests/GuestRaiseException.cpp:21:22: error: expected unqualified-id /Applications/Xcode.app/.../usr/include/sys/signal.h:122:17: note: expanded from macro 'SIGUSR1' ``` The test declares `static constexpr int SIGUSR1 = 30;` (from `dd2890c1c5`). On Windows and Linux that name is free in this translation unit; on macOS the SDK defines `SIGUSR1` as a macro in `<sys/signal.h>`, which libc++ reaches through `<stdlib.h>` → `<sys/wait.h>`, so the declaration expands to `static constexpr int 30 = 30;`. Rename it to `GUEST_SIGUSR1`, the name `GuestPthreadCreateSuspended.cpp:18` and `GuestSignalList.cpp:10-13` already use. The value and all 28 uses stay the same, so no behaviour changes. `GuestRaiseNestedSleep.cpp` has the same declaration but its target is inside `if(WIN32)` (`libkernel/CMakeLists.txt:1205`), so it never reaches a macOS build and is left alone. ### Tested - macOS 27.0.1 (26A434), Apple M4, Apple clang 21.0.0, CMake 4.4.4, Ninja 1.13.2, x86-64 Release under Rosetta 2, `main` `c547deaacb`, `-DBUILD_TESTING=ON -DCMAKE_OSX_ARCHITECTURES=x86_64`. - Before, the same build directory: `GuestRaiseException.cpp:21:22: error: expected unqualified-id`, as quoted above. - After: the object builds clean, 26,392 bytes, 0 errors. - **The test is not run.** `guest_raise_exception_tests` still does not link on `main`: `libkernel` needs #7631, #7804, #10552 and #11249 to build on macOS, so this removes one object that stops the build and nothing more. - `python3 tools/check_conventions.py --base origin/main`: all conventions checks passed. - `python3 tools/pr_overlap.py --branch fix/macos-raise-exception-signal-name`: no overlap with open pull requests. ### 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 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
MarcZX10 commented 2026-10-27 19:27:48 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-27T19:27:48Z.

Review: APPROVED


Reviewed exact head 76c419a572. The change consistently renames the test's guest signal constant to GUEST_SIGUSR1, avoiding the macOS SDK macro collision while preserving the value and all call sites. The author reports that the exact x86-64 macOS object, which failed before the rename, now compiles; this is the relevant verification because the Windows and Linux signal name was not conflicting. Hosted Windows and conventions checks pass, and the current-main merge preview and diff check are clean. No test behavior changed. Approved.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5673045892 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/12076#pullrequestreview-5673045892). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-27T19:27:48Z. **Review:** APPROVED --- Reviewed exact head 76c419a5728dd4b4b992636a50b5fb7d8ab6be30. The change consistently renames the test's guest signal constant to GUEST_SIGUSR1, avoiding the macOS SDK macro collision while preserving the value and all call sites. The author reports that the exact x86-64 macOS object, which failed before the rename, now compiles; this is the relevant verification because the Windows and Linux signal name was not conflicting. Hosted Windows and conventions checks pass, and the current-main merge preview and diff check are clean. No test behavior changed. Approved.
MarcZX10 commented 2026-10-27 20:41:28 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-27T20:41:28Z.

Review: CHANGES_REQUESTED


I had approved this exact head earlier after reviewing the rename and the reported macOS compile check. The later overlap report flagged shared edits to GuestRaiseException.cpp. I checked the current heads: this PR merges cleanly with main by itself, but pairwise merge-tree checks conflict when combined with both open #11872 and open #11969. Please coordinate an order and declare the required Depends on entries (or rebase after those changes land) so the macro rename is not lost during integration. No issue with the rename itself.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5674027153 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/12076#pullrequestreview-5674027153). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-27T20:41:28Z. **Review:** CHANGES_REQUESTED --- I had approved this exact head earlier after reviewing the rename and the reported macOS compile check. The later overlap report flagged shared edits to GuestRaiseException.cpp. I checked the current heads: this PR merges cleanly with main by itself, but pairwise merge-tree checks conflict when combined with both open #11872 and open #11969. Please coordinate an order and declare the required Depends on entries (or rebase after those changes land) so the macro rename is not lost during integration. No issue with the rename itself.
THEMANnt commented 2026-10-28 05:01:39 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by THEMANnt on 2026-10-28T05:01:39Z.

Review: APPROVED


Reviewed 76c419a5728dd4b4b992636a50b5fb7d8ab6be30 — approve. The guest signal constant avoids the host SIGUSR1 macro without changing its value or uses.

Windows/GCC 15.2: compiling the exact source with SIGUSR1 defined as 30 passes on head and fails at the constant declaration on base, reproducing the macro collision independently of Apple headers. An exact token-renaming comparison confirms the identifier rename is the only source change, including all uses. This is a syntax/control check, not a macOS SDK build or exception-runtime test. Hosted Build reports success.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5677992706 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/12076#pullrequestreview-5677992706). Originally posted by [THEMANnt](https://github.com/THEMANnt) on 2026-10-28T05:01:39Z. **Review:** APPROVED --- Reviewed `76c419a5728dd4b4b992636a50b5fb7d8ab6be30` — approve. The guest signal constant avoids the host SIGUSR1 macro without changing its value or uses. Windows/GCC 15.2: compiling the exact source with SIGUSR1 defined as 30 passes on head and fails at the constant declaration on base, reproducing the macro collision independently of Apple headers. An exact token-renaming comparison confirms the identifier rename is the only source change, including all uses. This is a syntax/control check, not a macOS SDK build or exception-runtime test. Hosted Build reports success.
MarcZX10 commented 2026-10-29 07:28:43 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-29T07:28:43Z.

Review: CHANGES_REQUESTED


Re-check — changes still requested

The old references to #11872 and #11969 are no longer actionable because both are closed. Their replacement PRs #12682 and #12688 are open and now conflict with this PR in GuestRaiseException.cpp; #4630 also remains open and conflicts in that file and the debt document. The current code-only fix still builds according to the author, but its merge order has not been recorded for the current open PRs.

What I checked

  • Refreshed the current PR, its latest author response, and hosted checks.
  • Read the full current diff: it renames the test’s guest signal constant references.
  • Compared the current head with main and ran pairwise merge previews with #12682, #12688, and #4630.
  • Ran git diff --check; no local build/test was run.

Results

Check Result
Current-main merge preview Clean
git diff --check Pass
Pairwise preview with #12682 Conflict in GuestRaiseException.cpp
Pairwise preview with #12688 Conflict in GuestRaiseException.cpp
Pairwise preview with #4630 Conflicts in GuestRaiseException.cpp and docs/dev/debt/libkernel.md
Hosted Windows and conventions Passed
Hosted Linux and specialized jobs Skipped
Author-reported macOS compile result Current head compiled; full build still has unrelated failures
Unedited local merge-check output
$ git rev-list --left-right --count upstream/main...refs/review/upstream-12076
1507 1
$ git merge-tree --write-tree upstream/main refs/review/upstream-12076
cbeb65c637a39342b317710425064c137243040c
$ git merge-tree --write-tree refs/review/upstream-12076 refs/review/upstream-12682
506a7db62c2580ab1668c78a0782a550d6e94d84
CONFLICT (content): core/libs/tests/GuestRaiseException.cpp
$ git merge-tree --write-tree refs/review/upstream-12076 refs/review/upstream-12688
e6d509fe6f02e96f57ea6b41b88fcfdbbd2c5089
CONFLICT (content): core/libs/tests/GuestRaiseException.cpp
$ git merge-tree --write-tree refs/review/upstream-12076 refs/review/upstream-4630
4a41e5a064465a027b0da9ec47061a016d9526af
CONFLICT (content): core/libs/tests/GuestRaiseException.cpp
CONFLICT (content): docs/dev/debt/libkernel.md
$ git diff --stat upstream/main...refs/review/upstream-12076
core/libs/tests/GuestRaiseException.cpp | 56 ++++++++++++++++-----------------
1 file changed, 28 insertions(+), 28 deletions(-)
$ git diff --check upstream/main...refs/review/upstream-12076
(no output; exit status 0)

Findings

Blocking

Please agree an order with the authors of the currently open #12682, #12688 and #4630, then record it in the relevant Depends on checklists or explain the chosen direct rebase strategy. The previous #11872/#11969 conflict report is obsolete; the replacements are separate open PRs, so resolve against their current heads.

Non-blocking

I found no new issue with the signal-constant rename itself. The author reports the current head removes this test file from the macOS compile failures. The reported full macOS build still has unrelated failures.

Sources

Not verified

I did not independently reproduce the author’s macOS build results.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5694216370 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/12076#pullrequestreview-5694216370). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-29T07:28:43Z. **Review:** CHANGES_REQUESTED --- # Re-check — changes still requested The old references to #11872 and #11969 are no longer actionable because both are closed. Their replacement PRs #12682 and #12688 are open and now conflict with this PR in `GuestRaiseException.cpp`; #4630 also remains open and conflicts in that file and the debt document. The current code-only fix still builds according to the author, but its merge order has not been recorded for the current open PRs. ## What I checked - Refreshed the current PR, its latest author response, and hosted checks. - Read the full current diff: it renames the test’s guest signal constant references. - Compared the current head with `main` and ran pairwise merge previews with #12682, #12688, and #4630. - Ran `git diff --check`; no local build/test was run. ## Results | Check | Result | |---|---| | Current-main merge preview | Clean | | `git diff --check` | Pass | | Pairwise preview with #12682 | Conflict in `GuestRaiseException.cpp` | | Pairwise preview with #12688 | Conflict in `GuestRaiseException.cpp` | | Pairwise preview with #4630 | Conflicts in `GuestRaiseException.cpp` and `docs/dev/debt/libkernel.md` | | Hosted Windows and conventions | Passed | | Hosted Linux and specialized jobs | Skipped | | Author-reported macOS compile result | Current head compiled; full build still has unrelated failures | <details><summary>Unedited local merge-check output</summary> ```text $ git rev-list --left-right --count upstream/main...refs/review/upstream-12076 1507 1 $ git merge-tree --write-tree upstream/main refs/review/upstream-12076 cbeb65c637a39342b317710425064c137243040c $ git merge-tree --write-tree refs/review/upstream-12076 refs/review/upstream-12682 506a7db62c2580ab1668c78a0782a550d6e94d84 CONFLICT (content): core/libs/tests/GuestRaiseException.cpp $ git merge-tree --write-tree refs/review/upstream-12076 refs/review/upstream-12688 e6d509fe6f02e96f57ea6b41b88fcfdbbd2c5089 CONFLICT (content): core/libs/tests/GuestRaiseException.cpp $ git merge-tree --write-tree refs/review/upstream-12076 refs/review/upstream-4630 4a41e5a064465a027b0da9ec47061a016d9526af CONFLICT (content): core/libs/tests/GuestRaiseException.cpp CONFLICT (content): docs/dev/debt/libkernel.md $ git diff --stat upstream/main...refs/review/upstream-12076 core/libs/tests/GuestRaiseException.cpp | 56 ++++++++++++++++----------------- 1 file changed, 28 insertions(+), 28 deletions(-) $ git diff --check upstream/main...refs/review/upstream-12076 (no output; exit status 0) ``` </details> ## Findings ### Blocking Please agree an order with the authors of the currently open #12682, #12688 and #4630, then record it in the relevant `Depends on` checklists or explain the chosen direct rebase strategy. The previous #11872/#11969 conflict report is obsolete; the replacements are separate open PRs, so resolve against their current heads. ### Non-blocking I found no new issue with the signal-constant rename itself. The author reports the current head removes this test file from the macOS compile failures. The reported full macOS build still has unrelated failures. ## Sources - [Current PR head `76c419a5728dd4b4b992636a50b5fb7d8ab6be30`](https://github.com/boykopovar/AnyPS5/commit/76c419a5728dd4b4b992636a50b5fb7d8ab6be30) - [Current upstream `main` `edf6804cf52c62eacafc592dd6142cb4efe5bd05`](https://github.com/boykopovar/AnyPS5/commit/edf6804cf52c62eacafc592dd6142cb4efe5bd05) - [Author’s overlap update](https://github.com/boykopovar/AnyPS5/pull/12076#issuecomment-6474044934) - [Current open successor #12682](https://github.com/boykopovar/AnyPS5/pull/12682) - [Current open successor #12688](https://github.com/boykopovar/AnyPS5/pull/12688) - [Current #4630 overlap](https://github.com/boykopovar/AnyPS5/pull/4630) - [Repository overlap-order rule](https://github.com/boykopovar/AnyPS5/blob/edf6804cf52c62eacafc592dd6142cb4efe5bd05/CONTRIBUTING.md#L67-L71) ## Not verified I did not independently reproduce the author’s macOS build results.
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!12076
No description provided.