test(libc): register the macOS write watch fault tests once #13220

Merged
Gonic0 merged 1 commit from upstream-pr/13220 into main 2026-11-01 03:58:51 +00:00
Gonic0 commented 2026-10-30 06:50:00 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by Gonic0 on 2026-10-30T06:50:00Z.


What

core/libs/tests/write_watch/CMakeLists.txt registers the execute-fault and read-fault write watch tests twice: #12117 (eb20686c42) and #12435 (1f1da4b0ff) each added the same foreach(mode execute-fault read-fault) block, and both are on main. The directory is added only on macOS (if(APPLE) in core/libs/CMakeLists.txt), so on macOS with tests enabled CMake stops while configuring:

CMake Error at core/libs/tests/write_watch/CMakeLists.txt:42 (add_test):
  add_test given test NAME "write_watch_execute-fault" which already exists
  in this directory.

and the same for write_watch_read-fault, which also blocks every build in that tree. This removes the second block. Linux and Windows do not add the directory and are unaffected.

Tested

Apple M5 Pro, macOS 27.2, x86-64 Release under Rosetta 2. main alone does not build on macOS; I configured and built in a tree with the open macOS port PRs merged with today's main, where the file is identical to this branch's.

  • Before: reconfiguring with BUILD_TESTING=ON fails with the error above.
  • After: CMake configures, write_watch_tests and write_watch_backing_tests build, and ctest -R '^write_watch_' passes 18 of 18, with write_watch_execute-fault and write_watch_read-fault listed once each.

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: configuring a macOS build with tests on main
  • GPUs tested: none (build and test registration only)
  • AI-assisted: yes

🤖 Generated with Claude Code

<!-- greyfinch-sync:boykopovar/AnyPS5:issue:5080615518 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/13220). Originally posted by [Gonic0](https://github.com/Gonic0) on 2026-10-30T06:50:00Z. --- ### What `core/libs/tests/write_watch/CMakeLists.txt` registers the `execute-fault` and `read-fault` write watch tests twice: #12117 (`eb20686c42`) and #12435 (`1f1da4b0ff`) each added the same `foreach(mode execute-fault read-fault)` block, and both are on `main`. The directory is added only on macOS (`if(APPLE)` in `core/libs/CMakeLists.txt`), so on macOS with tests enabled CMake stops while configuring: ```text CMake Error at core/libs/tests/write_watch/CMakeLists.txt:42 (add_test): add_test given test NAME "write_watch_execute-fault" which already exists in this directory. ``` and the same for `write_watch_read-fault`, which also blocks every build in that tree. This removes the second block. Linux and Windows do not add the directory and are unaffected. ### Tested Apple M5 Pro, macOS 27.2, x86-64 Release under Rosetta 2. `main` alone does not build on macOS; I configured and built in a tree with the open macOS port PRs merged with today's `main`, where the file is identical to this branch's. - Before: reconfiguring with `BUILD_TESTING=ON` fails with the error above. - After: CMake configures, `write_watch_tests` and `write_watch_backing_tests` build, and `ctest -R '^write_watch_'` passes 18 of 18, with `write_watch_execute-fault` and `write_watch_read-fault` listed once each. ### 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: configuring a macOS build with tests on `main` - [x] GPUs tested: none (build and test registration only) - [x] AI-assisted: yes 🤖 Generated with [Claude Code](https://claude.com/claude-code)
imellag commented 2026-10-30 21:26:46 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by imellag on 2026-10-30T21:26:46Z.

Review: APPROVED


Confirmed on a second Mac. Apple M4 Pro, macOS 27.2, Apple clang 21.0.0, x86-64 Release.

main 21a556f567 still registers the foreach(mode execute-fault read-fault) block twice, and this morning a configure with BUILD_TESTING=ON on main 98ddd9c179 stopped with the same add_test given test NAME "write_watch_execute-fault" which already exists error. With head e9f09f54fa in the tree, it configures and builds. The tree is our macOS support branch support/macos-boot-1030c (05bd71a66b): main 21a556f567 + the open macOS PRs, this one included. ctest -R '^write_watch' passes 18 of 18, and write_watch_execute-fault and write_watch_read-fault each run once.

The change only drops the duplicate block, which is identical to the one kept above it.

AI-assisted: yes

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5718841001 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/13220#pullrequestreview-5718841001). Originally posted by [imellag](https://github.com/imellag) on 2026-10-30T21:26:46Z. **Review:** APPROVED --- Confirmed on a second Mac. Apple M4 Pro, macOS 27.2, Apple clang 21.0.0, x86-64 Release. `main` `21a556f567` still registers the `foreach(mode execute-fault read-fault)` block twice, and this morning a configure with `BUILD_TESTING=ON` on `main` `98ddd9c179` stopped with the same `add_test given test NAME "write_watch_execute-fault" which already exists` error. With head `e9f09f54fa` in the tree, it configures and builds. The tree is our macOS support branch [`support/macos-boot-1030c`](https://github.com/imellag/AnyPS5/commits/support/macos-boot-1030c) (`05bd71a66b`): `main` `21a556f567` + the open macOS PRs, this one included. `ctest -R '^write_watch'` passes 18 of 18, and `write_watch_execute-fault` and `write_watch_read-fault` each run once. The change only drops the duplicate block, which is identical to the one kept above it. 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!13220
No description provided.