test(libc): cover siginterrupt state boundaries #9001

Merged
Queuse merged 10 commits from upstream-pr/9001 into main 2026-10-25 15:45:14 +00:00
Queuse commented 2026-10-21 09:13:26 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by Queuse on 2026-10-21T09:13:26Z.


What

Add a focused siginterrupt regression for signal-set boundaries, nonzero flags, errno and neighboring-state preservation, later signal registrations and invalid signals. The implementation is already in main; this PR changes only the regression fixture and its CTest registration.

Tested

Windows 11 x86-64, WinLibs MinGW-w64 GCC 15.2.0-r7, Ninja, Release. Head 48c595d09d includes main 63a863d3b0.

  • Rebuilt affected libraries and focused targets; guest_signals, guest_signal_interrupt, guest_sigtimedwait and guest_signal_sets: 4/4 pass, with no skips.
  • Public declaration audit, conventions and whitespace checks pass. The fixture uses canonical public headers.
  • Consulted main 75227c7cdc leaves the focused library/fixture sources and test registrations unchanged after the tested base; the trial merge is clean and retains the intervening debt corrections. Intervening shader changes are outside these focused runtime tests.
  • No fresh Linux/macOS runtime, full hosted product build, title or console run.

The confirmed order is #9001 before #10749. The latter adds libSceLibcInternal to this test target when it integrates main; #9499 follows #10749. This test has no library-implementation dependency.

Overlap snapshot 63a863d3b0: no confirmed intersection for this test-only change. 20 shared-file comparisons are incomplete because those branches conflict with the base: #4563, #5021, #6830, #6936, #7192, #7201, #8520, #9187, #9284, #9293, #9297, #9302, #9499, #9557, #9561, #9566, #9575, #9669, #9693, #9938. Manual inspection finds distinct kernel test registrations and unrelated platform settings; no duplicate fixture or CTest name. These checks do not establish a combined runtime pass with the conflicting branches.

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:4949205532 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/9001). Originally posted by [Queuse](https://github.com/Queuse) on 2026-10-21T09:13:26Z. --- ### What Add a focused siginterrupt regression for signal-set boundaries, nonzero flags, errno and neighboring-state preservation, later signal registrations and invalid signals. The implementation is already in main; this PR changes only the regression fixture and its CTest registration. ### Tested Windows 11 x86-64, WinLibs MinGW-w64 GCC 15.2.0-r7, Ninja, Release. Head `48c595d09d` includes main `63a863d3b0`. - Rebuilt affected libraries and focused targets; guest_signals, guest_signal_interrupt, guest_sigtimedwait and guest_signal_sets: 4/4 pass, with no skips. - Public declaration audit, conventions and whitespace checks pass. The fixture uses canonical public headers. - Consulted main `75227c7cdc` leaves the focused library/fixture sources and test registrations unchanged after the tested base; the trial merge is clean and retains the intervening debt corrections. Intervening shader changes are outside these focused runtime tests. - No fresh Linux/macOS runtime, full hosted product build, title or console run. The confirmed order is #9001 before #10749. The latter adds libSceLibcInternal to this test target when it integrates main; #9499 follows #10749. This test has no library-implementation dependency. Overlap snapshot `63a863d3b0`: no confirmed intersection for this test-only change. 20 shared-file comparisons are incomplete because those branches conflict with the base: #4563, #5021, #6830, #6936, #7192, #7201, #8520, #9187, #9284, #9293, #9297, #9302, #9499, #9557, #9561, #9566, #9575, #9669, #9693, #9938. Manual inspection finds distinct kernel test registrations and unrelated platform settings; no duplicate fixture or CTest name. These checks do not establish a combined runtime pass with the conflicting branches. <!-- OS, title or homebrew, what was checked. "Not tested" is a valid answer. A performance change: the summary lines of main and of this PR from the same machine and scene, with the traces attached, captured as the Performance report issue form describes. --> ### Checklist <!-- Rules behind each item: https://github.com/boykopovar/AnyPS5/blob/main/CONTRIBUTING.md --> - [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 <!-- #PR, or none --> - [x] Fixes: none <!-- issue it closes as Fixes #N, or none --> - [x] Unblocks: none <!-- title ID and Game bring-up discussion, e.g. PPSA01325 #3232, or none --> - [x] GPUs tested: n/a <!-- for AGC, shader recompiler or VideoOut changes: vendor, model, driver and OS of each GPU the GPU tests ran on; otherwise n/a --> - [x] AI-assisted: yes <!-- yes / no -->
clairtonmichel commented 2026-10-21 09:26:34 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by clairtonmichel on 2026-10-21T09:26:34Z.


Tested on AMD Ryzen 7 9800X3D and AMD Radeon RX 7900 XTX (Fedora Linux, Mesa 26.2.5):

  • Built cleanly with zero errors.
  • Ran the complete libc signal and state boundary test suite (guest_signal_interrupt, guest_signals, guest_sigtimedwait, guest_sigaltstack, guest_host_libc, etc.): 100% passed successfully (15/15 green in 2.28s).
  • siginterrupt state boundaries coverage behaves correctly on host. Ready to merge!
<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6312622918 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/9001#issuecomment-6312622918). Originally posted by [clairtonmichel](https://github.com/clairtonmichel) on 2026-10-21T09:26:34Z. --- Tested on AMD Ryzen 7 9800X3D and AMD Radeon RX 7900 XTX (Fedora Linux, Mesa 26.2.5): - Built cleanly with zero errors. - Ran the complete `libc` signal and state boundary test suite (`guest_signal_interrupt`, `guest_signals`, `guest_sigtimedwait`, `guest_sigaltstack`, `guest_host_libc`, etc.): **100% passed successfully (15/15 green in 2.28s)**. - `siginterrupt` state boundaries coverage behaves correctly on host. Ready to merge!
EagleBearerYS commented 2026-10-22 00:50:28 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by EagleBearerYS on 2026-10-22T00:50:28Z.


@Queuse a merge-order note: this PR carries #8866's and #8872's commits, and #9499 changes Signals.cpp next to both: a SettleReset(guest) call in signal_nid_postfix, and a load-time registration of sigprocmask with libc at the end of the file. Both sides' lines stay. #9499 goes after #8866 and proposes going before #8872 and this PR, which would rebase over it. If you'd rather, say so and #9499 will list them under Depends on.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6329958304 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/9001#issuecomment-6329958304). Originally posted by [EagleBearerYS](https://github.com/EagleBearerYS) on 2026-10-22T00:50:28Z. --- @Queuse a merge-order note: this PR carries #8866's and #8872's commits, and #9499 changes `Signals.cpp` next to both: a `SettleReset(guest)` call in `signal_nid_postfix`, and a load-time registration of `sigprocmask` with libc at the end of the file. Both sides' lines stay. #9499 goes after #8866 and proposes going before #8872 and this PR, which would rebase over it. If you'd rather, say so and #9499 will list them under Depends on.
Queuse commented 2026-10-22 01:05:03 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by Queuse on 2026-10-22T01:05:03Z.


@EagleBearerYS That order works for me: #8866 → #9499 → #8872 → this PR. I've added #9499 to the dependencies here. Once it lands, I'll rebase, keep SettleReset(guest) alongside the _sigintr check and preserve both load-time registrations, then rerun the focused signal tests. Thanks for checking the overlap.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6330144725 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/9001#issuecomment-6330144725). Originally posted by [Queuse](https://github.com/Queuse) on 2026-10-22T01:05:03Z. --- @EagleBearerYS That order works for me: #8866 → #9499 → #8872 → this PR. I've added #9499 to the dependencies here. Once it lands, I'll rebase, keep `SettleReset(guest)` alongside the `_sigintr` check and preserve both load-time registrations, then rerun the focused signal tests. Thanks for checking the overlap.
THEMANnt commented 2026-10-25 10:52:38 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by THEMANnt on 2026-10-25T10:52:38Z.

Review: APPROVED


Reviewed current head 48c595d09dd9f834534c65b944a2c7648fc58bfa against 63a863d3b07f2457ee1210f1abba1c11409cdff5: approve. No actionable findings in this signal regression test and its CMake registration.

The test covers all four signal-set word boundaries, nonzero/zero flag behavior, neighboring bits, errno preservation, handler/mask preservation, subsequent signal registration and invalid-signal rejection. Reviewed the complete author patch and the matching Process.cpp siginterrupt bridge and Signals.cpp implementations; the expected shared-state behavior is consistent.

Validation: the complete exact head GuestSignalInterrupt.cpp compiled and ran successfully with the pinned Process.cpp and Signals.cpp source units, using the repository's Windows DWARF/unwind settings and section-renaming step. Existing development libkernel/libc DLLs supplied ancillary symbols; this is a pinned-source integration test, not a complete rebuild of those libraries. Conventions, whitespace and test registration passed. The test is absent from baseline, so no artificial baseline import/link failure is claimed as regression sensitivity.

The earlier attempt used older DLLs without the required exports and standalone builds omitted the repository's unwind settings. Those reviewer-environment limitations are resolved for this focused test. Hosted native jobs remain skipped; no full application/game execution is claimed.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5642817844 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/9001#pullrequestreview-5642817844). Originally posted by [THEMANnt](https://github.com/THEMANnt) on 2026-10-25T10:52:38Z. **Review:** APPROVED --- Reviewed current head `48c595d09dd9f834534c65b944a2c7648fc58bfa` against `63a863d3b07f2457ee1210f1abba1c11409cdff5`: approve. No actionable findings in this signal regression test and its CMake registration. The test covers all four signal-set word boundaries, nonzero/zero flag behavior, neighboring bits, errno preservation, handler/mask preservation, subsequent signal registration and invalid-signal rejection. Reviewed the complete author patch and the matching Process.cpp siginterrupt bridge and Signals.cpp implementations; the expected shared-state behavior is consistent. Validation: the complete exact head GuestSignalInterrupt.cpp compiled and ran successfully with the pinned Process.cpp and Signals.cpp source units, using the repository's Windows DWARF/unwind settings and section-renaming step. Existing development libkernel/libc DLLs supplied ancillary symbols; this is a pinned-source integration test, not a complete rebuild of those libraries. Conventions, whitespace and test registration passed. The test is absent from baseline, so no artificial baseline import/link failure is claimed as regression sensitivity. The earlier attempt used older DLLs without the required exports and standalone builds omitted the repository's unwind settings. Those reviewer-environment limitations are resolved for this focused test. Hosted native jobs remain skipped; no full application/game execution is claimed.
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!9001
No description provided.