Repository navigation
test(libkernel): cover cancellation recovery for #1668 - #1739
Conversation
a8875dd to
52fdd15
Compare
adriadam10
left a comment
There was a problem hiding this comment.
Checked on Linux (merged onto current main): builds, and guest_pthread_cancel, guest_pthread_cancel_recovery, guest_pthread_cancel_recovery_coarse, guest_pthread_key, guest_pthread_sem and guest_cond_timedwait pass 5/5 repetitions.
- This branch carries #1141's two implementation commits (
c2186de0e,638e5df04), so it can't be merged as is: it would land #1141's code without that PR's review, and #1141 still has open review requests. CONTRIBUTING asks for one topic per PR. - Please wait until #1141 lands, then rebase so the PR contains only
GuestPthreadCancel.cpp,GuestPthreadCancelRecovery.cpp,ARCHITECTURE.md,TechnicalDebt.mdand the CMake test registration. We'll review it right after. - The
TechnicalDebt.mdentry should not sit last in its section; place it away from other entries to avoid adjacency conflicts.
52fdd15 to
f9b221e
Compare
|
Rebased onto current main (
Build and test evidence on this headUbuntu 24.04, g++ 13.3.0, cmake 4.4.4, ninja 1.13.2,
Please disregard my earlier comment on this PR, which said I had no reachable toolchain here. That was wrong: it described the state before a sandbox-policy change in my environment, and I repeated it without re-testing. It is corrected above. One unrelated observation, for whoever maintains
|
|
Checked
AI-assisted: yes (Claude Code). |
Refs boykopovar#1668. Complements boykopovar#1141 with resource ownership and lifecycle regressions.
66412d9 to
93951bf
Compare
|
On The Built AI-assisted: yes (Claude Code Fable 5.1 xhigh) |
93951bf to
982f7d7
Compare
|
Removed Updated the description to reflect the merged #1141 and four-file scope. Conventions and whitespace checks pass. The test and CMake registration are unchanged; runtime tests were not rerun for this documentation-only correction. |
adriadam10
left a comment
There was a problem hiding this comment.
Checked on Linux (merged onto current main): the new guest_pthread_cancel_recovery and _coarse tests build and pass together with guest_pthread_cancel, guest_pthread_key, guest_pthread_sem and guest_cond_timedwait over 10 repetitions; the documentation claims match Thread.cpp, Cancel.hpp and TimedWait.cpp. Also confirmed by @orishamir (20 repetitions, WSL2/GCC 15.2). Merging.
What
Refs #1668. Add cancellation recovery regressions and documentation alongside the implementation already merged in #1141.
The branch is based on main
4a747c4872814908702fe81db6a20405a53a07d7and contains one complementary commit,982f7d7817be2e06af99e7518238d80d1551b9de. Its four changed files are:core/libs/tests/GuestPthreadCancelRecovery.cppcore/libs/prx/libkernel/CMakeLists.txtdocs/dev/ARCHITECTURE.mddocs/dev/TechnicalDebt.mdThe regression checks that pending cancellation preserves semaphore tokens and join ownership; repeated requests produce one exit; cleanup runs in reverse order before thread-specific destruction; a cancelled condition waiter reacquires its mutex before cleanup; and fresh threads can reuse the same resources with enabled/deferred defaults. Atomic gates and mutex handshakes establish ordering without scheduling sleeps. Assertions remain active in Release. Normal and
APS5_COARSE_TIMED_WAITS=1cases each have a 20-second timeout.The documentation records the lifecycle, pinned FreeBSD reference contract and remaining coverage gaps. Asynchronous behavior, file/socket cancellation points, sleep interruption, cancellation versus exit/detach, condition signal conservation and non-null invalid/reclaimed handles remain incomplete or unverified. No console title or homebrew establishes cleanup ABI compatibility.
The cancellation coverage entry sits inside
### Functional, near the thread cancellation material and before MIMG entries. It is not appended at the end of the section. No cancellation implementation changes are included.Tested
Synthetic guest-API tests; no console, title or homebrew measurements.
The independent review on
93951bfcreports Linux, GCC 15.2.0, Release,BUILD_TESTING=ON, fullall+libsbuilds, with 20 passing repetitions each of:guest_pthread_cancelguest_pthread_cancel_recoveryguest_pthread_cancel_recovery_coarseguest_pthread_keyguest_pthread_semguest_cond_timedwaitFor this documentation correction, the CMake registration, recovery test and architecture documentation were verified byte-identical between
93951bfcand the restored head982f7d78. Only the technical-debt entry's placement changed. Local conventions and whitespace checks pass. Runtime tests were not rerun for this correction; the reviewer results above are attributed to their tested head.Full Linux/Windows PR builds require a collaborator-triggered workflow under the repository's current CI policy. Automatic PR checks do not establish full runtime test coverage.
Checklist
main; complements the merged feat(libkernel): implement thread cancellation #1141 implementation