test(libkernel_sys): cover raw getcwd internal path limit #16414
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/16414"
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-06T16:28:05Z.
What
Adds a standalone Linux test for the raw getcwd internal path limit from #16370. Existing short-path tests miss this boundary.
Guest paths of 1023 bytes must succeed with exact bytes and NUL. Paths of 1024 bytes must return ENOMEM (12).
Both use caller capacity 4096. The test checks all output sentinels and ENOMEM precedence over a null output pointer.
It uses an isolated directory tree and restores both working directories before removing that tree.
The contract follows FreeBSD 11.4's cap and copyout order.
This adds coverage only. The parent keeps its production changes and existing test cases.
Tested
Ubuntu 24.04.2 under WSL2, x86-64 Intel Core i7-13700K, GCC 13.3, Release.
bfbb25cb725a74f1ca7413adc9237f3542c48bb3.ee6e8b6a7ede17f4d272e7a6e69ce97045e64537.c9708515bdeffcd9d6dc89bb154e5620f9d9abcd.c3a9a330a99beaeda1cd1be72e390f0a412a092e.Publication refresh: main
9a4320c062d202ac74f23dd4f648d77590c84742merges cleanly with this branch.Its two newer files are outside both test targets. Runtime results below remain pinned to the tested main.
The branch starts on main. Parent changes are present only in the separate integration build.
Both source snapshots match all 6796 files from their declared Git trees, with pinned dependency sources.
The new test intentionally fails without #16370. Please merge that dependency first, or select both PRs for CI.
guest_kernel_sysguest_raw_getcwd_capThe mutation replaces only
Fail(error == GuestErange ? GuestEnomem : error)withFail(error).Source bytes restore, and both test executables stay unchanged across the mutation. No fixture directories remain.
Each CTest finishes below one second; the new test has a 20-second timeout.
Commands from the contribution workspace:
Builds use an environment without credential variables. Both targets link the actual guest libraries from their selected build.
Conventions pass. The complete overlap tool reports no confirmed collision, but cannot compare 16 branches that conflict with main.
I checked each shared CMake diff at its exact head. They change other registrations or library setup; none adds this test.
Those PRs are #5021, #7275, #8650, #9156, #9293, #9297, #9302, #9383, #12642, #13486, #14304, #14798, #15111, #15804, #15807 and #15836.
Full suite, Windows, macOS, titles and console behavior are not tested. This CPU-only change needs no GPU run.
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 gabichuuuuu on 2026-11-08T21:44:13Z.
Review: COMMENTED
Windows run of head
ee6e8b6a7e, merged ontomain095ff72367in one tree with other open PRs that touch different files (each PR's test is its own file, so they don't interact). Setup: Windows 11, WinLibs GCC 15.2 r7 (x86_64-ucrt-posix-seh, the CI toolchain), Release,BUILD_TESTING=ON.guest_raw_getcwd_cap_testsis registered only whenCMAKE_SYSTEM_NAMEisLinux, so a Windows build has no such target.Pull request closed