test(libSceNpCommon): wake condition waiters and mask and cancel event flags #13978
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/13978"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from boykopovar/AnyPS5. Originally posted by LeandroLP23 on 2026-10-31T14:24:47Z.
What
The NP condition wrappers were only tested with no waiter:
sceNpCondInit,Signal,TimedwaitandDestroyin thesynccase.sceNpCondWait,sceNpCondSignalAll,sceNpCondSignalToand everysceNpLwCond*call had no test.sceNpClearEventFlagandsceNpCancelEventFlaghad none either.wakecase inGuestNpCommon.cpp(registered with the otherguest_np_common_*cases, same 20 s timeout). For the plain and the lightweight condition:sceNpCondWait/sceNpLwCondWaituntil a flag is set;Signal(one waiter),SignalAll(two waiters) orSignalTo(the target thread);sceNpLwCondInit/sceNpLwCondDestroycreate and destroy the lightweight condition.GuestNpCommonRuntime.cpp:sceNpClearEventFlag(flag, 5)keeps bits 1 and 4 and clears bit 2;sceNpCancelEventFlag(flag, 0x10, &waiting)reports no waiters and leaves the pattern at0x10.Test only.
Tested
guest_np_common*tests passed.guest_np_common_wakealso passed 50 of 50 runs withctest --repeat until-fail:50.tools/check_conventions.py --base origin/mainpassed.tools/pr_overlap.pyfound no confirmed overlap. It could not compare 11 PRs that conflict withmainand sharecore/libs/CMakeLists.txt; none of their diffs touch theguest_np_commontests.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-31T14:38:56Z.
Review: APPROVED
Reviewed — looks good
At head
11e2833b9b1334261dd73fae3c4b8843b84986f9, the new cases exercise plain and lightweight condition waits, signal/broadcast/signal-to wakeups, and event-flag mask/cancel forwarding (condition wrappers, event-flag wrappers, wake tests, flag tests). Hosted Windows, conventions, and library portability passed; the author reports 50 consecutive wake-test passes. I did not run a local C++ build or test, and Linux product CI was skipped.Non-blocking coverage note:
SignalTois tested with one waiter, so the test confirms that its call wakes a waiter but does not distinguish targeted wakeup from ordinary single-waiter signaling.