Repository navigation
feat(libSceNpTus): create NpId title contexts with sceNpTusCreateNpTitleCtx - #13458
Conversation
…tleCtx sceNpTusCreateNpTitleCtx makes the same checks as sceNpTssCreateNpTitleCtx, which already follows shadPS4's sceNpTusCreateNpTitleCtx: a null npId is INSUFFICIENT_ARGUMENT, service label 0xFFFFFFFF is INVALID_ARGUMENT, and otherwise it creates a context in the shared 32-context table. The signature is shadPS4's and fpPS4's.
MarcZX10
left a comment
There was a problem hiding this comment.
Reviewed — looks good
The wrapper delegates to the existing TSS context creator, and the new tests cover its argument precedence, shared capacity, request lifecycle, and deletion behavior.
What I ran
Reviewed head 41c1f7881abbebcd1fce5e0a008f7454a4bbe5c9 against PR base 9f748f4d8e36ce3714f3b95f3386316e110a9b22. A read-only merge preview onto current upstream/main 9304896d89f070f65b8f38bd3a8024d5c19f8fe1 was clean (tree 2202ab9a68cb2942f59904f56343f0adaf4f54f4). Environment: Linux x86_64, Python 3.11.2, GCC 12.2.0.
git diff --check 9f748f4d8e36ce3714f3b95f3386316e110a9b22...41c1f7881abbebcd1fce5e0a008f7454a4bbe5c9
python3 tools/check_conventions.py --base 9f748f4d8e36ce3714f3b95f3386316e110a9b22 --head 41c1f7881abbebcd1fce5e0a008f7454a4bbe5c9
python3 tools/pr_abi_audit.py --base 9f748f4d8e36ce3714f3b95f3386316e110a9b22 --head 41c1f7881abbebcd1fce5e0a008f7454a4bbe5c9
python3 tools/pr_test_quality.py --root . core/libs/tests/GuestNpTus.cpp
git merge-tree --write-tree refs/remotes/upstream/main refs/remotes/review/pr-13458Diff check and conventions passed; the ABI audit found consistent declarations and definitions. The test-quality heuristic warned that it could not find a literal CMake test path; I verified the test is registered in core/libs/prx/libSceNpTus/CMakeLists.txt through ${LIBS_INCLUDE_DIR}. The aggregate precheck could not find local-only helper scripts in its isolated copy, so I ran the relevant audit helpers directly. No build or C++ tests were run locally.
Not verified
The PR's hosted checks were queued at final refresh. I did not independently run the author's reported Linux test or negative control, or verify console behavior.
|
Windows result for head Host: Windows 11 26300, Intel i7-12700K, WinLibs GCC 15.2.0 (x86_64-ucrt-posix-seh, r6), Release, The tree also carried the open PRs #13485, #13479, #13470, #13462, #13459, #13457, #13456, all merged cleanly, so the run is a joint one. AI-assisted: yes (Claude Code), the runs and the numbers above are from this machine. |
|
Checked the check order against shadPS4 (null |
Source of the behaviour
Not measured on a device. The checks follow shadPS4's
sceNpTusCreateNpTitleCtx(GPL, used for behaviour only; no code is taken from it), the same function the mergedsceNpTssCreateNpTitleCtx(#9531) already follows. The signature is shadPS4's and fpPS4's; fpPS4 only returns -1, so it settles the parameter list and nothing else.sceNpTusCreateNpTitleCtx(serviceLabel, npId)npIdnullINSUFFICIENT_ARGUMENT0x8055070CserviceLabel0xFFFFFFFFINVALID_ARGUMENT0x80550704Aand TSS forms)TOO_MANY_OBJECTS0x80550706In-tree lines that change: the throwing sceNpTusCreateNpTitleCtx, which now calls sceNpTssCreateNpTitleCtx, and the debt entry that listed it. The declaration keeps its signature.
What
sceNpTusCreateNpTitleCtxno longer throws. It makes the checks ofsceNpTssCreateNpTitleCtx(table above) and creates its context in the same table assceNpTusCreateNpTitleCtxAand the TSS forms, so requests, deletion and the 32-context limit behave the same for all four creators.The
Unknown function infoentry is removed, because fpPS4 now gives a second source for the prototype. A newFunctionalentry records what stays open: nothing is measured on a device, and thenpIdcontents are neither read nor kept with the context.Tested
mainwith this branch applied:guest_np_tuspasses. The new cases check a nullnpIdwith a valid and an invalid service label, the invalid label with a validnpId, that a created context takes requests and that deleting it removes them, the 32-context limit shared withsceNpTusCreateNpTitleCtxAandsceNpTssCreateNpTitleCtx, and that the argument errors come before the limit.main,guest_np_tusfails withsceNpTusCreateNpTitleCtx not implemented.python3 tools/check_conventions.py --base origin/mainpasses.tools/progress.pyagainstmain: +1 implemented function (sceNpTusCreateNpTitleCtx); libSceNpTus 121/142 to 122/142.tools/pr_overlap.py: no overlap with open pull requests (feat(libSceNpTus): implement sceNpTssGetData and sceNpTssGetDataAsync #10693 and feat(libSceNpTus): implement the friends A and CrossSave calls and two virtual-user calls #10675 touch the same files and merge cleanly).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)