test(libSceAmpr): cover the wait command sizes, the buffer size and sceAmprUdivti3 #13990
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/13990"
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:31:43Z.
What
sceAmprMeasureCommandSizeWaitOnAddress,sceAmprMeasureCommandSizeWaitOnCounter,sceAmprCommandBufferGetSizeandsceAmprUdivti3had no test. Two cases are added toGuestAmpr.cpp:TestMeasuredWaitsAndBufferSize: a 2048-byte APR buffer reports 2048 fromsceAmprCommandBufferGetSizebefore and after recording. It records oneWaitOnAddressand oneWaitOnCounter. The existingRequireAppendedchecks that each grows the buffer by its measured size, adds one command, and writes a header with its opcode and size.TestUdivti3:sceAmprUdivti3equals the compiler'sunsigned __int128division for six pairs: dividends and divisors above 2^64, a divisor larger than the dividend, all-ones by all-ones, and a small pair.Test only.
Tested
guest_ampr_markerspassed.tools/check_conventions.py --base origin/mainpassed.tools/pr_overlap.pycould not compare #10025, which conflicts withmainand also editsGuestAmpr.cpp. Its diff is about AMM PRT zero pages and does not touch these functions.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:39:11Z.
Review: APPROVED
Reviewed — looks good
At head
03c305a73f81eb905ff60f6f0cc813baafab3394, the new assertions check the recorded wait-command opcodes and measured sizes, preserve the command-buffer capacity, and compare wide unsigned division results with the compiler’sunsigned __int128operation (tests, size/measurement implementations, division export). Hosted Windows, conventions, library portability, intake, labels, and eligibility passed. The author reports the focused test and mutation checks passed; I did not run a local build or test, and product CI jobs were skipped.