test(libc): cover multi-cycle getopt argument permutation #16434
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/16434"
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 ahmadmuj on 2026-11-06T17:32:56Z.
What
Add a standalone regression for stable
getopt_longpermutation with two operands and four option/value words. This requires two rotation cycles; existing cases exercise one cycle.The fixture checks
r, r, -1, argument pointer identity,optindvalues5, 7, 5, the option index, final nulloptarg, all eight final pointers, and unchanged strings. It uses distinct writable strings, a final null argv slot, guest environment restoration, and a separate test process.The contract is FreeBSD 11.4 getopt_long.c at 8c639945a44588f6cfdddfb057bb5aad88735da0, already cited by the library's debt entry. No production defect or console behavior is claimed. Production and the existing fixture stay unchanged.
Tested
CPU only: Intel Core i7-13700K, Ubuntu 24.04, x86-64 WSL2, kernel
6.18.33.2-microsoft-standard-WSL2, GCC 13.3.0, Release.Base:
9fb6149d12d51e8dc769943c828f2f23635acb4d. Head:1db991429d152a634407efe0c3ea509381f0ed9e.Fresh main
edf71e7244ee064ff43f70eb1b9657379aa3cf37changes only Zlib files. A merge preview is clean; it is not an integration test.Separate source snapshots match every tracked file of those revisions. Configure, build and test use a clean environment with
GIT_CEILING_DIRECTORIESset above the snapshots. Generated revision metadata is empty because these snapshots have no Git metadata; archive comparisons establish the pins. Dependencies match the pinned submodules.Commands (
$srcand$buildselect each revision's isolated paths):The first target/test pair runs on main. Both targets run on head; head configuration also enables
CMAKE_EXPORT_COMPILE_COMMANDS.Gcd(nonOptions, options)to1. The old test still passes; the new test fails atstable pointer order.libSceLibcInternal,libc, andlibkernelmodules from this build.Windows, full-suite CI, games, consoles and GPUs are not tested. Full CI needs a maintainer to start it.
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)Pull request closed