fix(libkernel): estimate kern.proc.proc with five extra records, as FreeBSD 11.4 does #22014
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/22014"
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 brajankw on 2026-11-17T01:32:43Z.
What
sysctl{CTL_KERN,KERN_PROC,KERN_PROC_PROC} with a null output reported the size of the one record it returns. FreeBSD 11.4'ssysctl_kern_procadds fivekinfo_procrecords to a null-output query ("overestimate by 5 procs") before it counts the processes (thekern.proc.procentry indocs/dev/debt/libkernel.md).ENOMEMfor a short one, are unchanged.GuestSystemConfiguration.cpp: the size query with three and with four MIB elements gives 6 × 1,088;sysctlbyname("kern.proc.proc")gives the same size.Tested
Linux (Debian 13, GCC 14.2.0, Release), on
mainab5089590a.ctest -R '^guest_system_configuration$': passed.main'sSystemConfiguration.cppand this branch's test,guest_system_configurationaborts at the size check.ctest(5893 tests,-j 12) with this branch merged together with my other three branches of this batch: 5877 passed. The 16 failures are the set that fails onmainin the same environment: sixagc_drivercases (agc_driver_image_table_packed_guardspasses when run on its own) and ten that need a.gitdirectory, network or a passwd entry for the user.python3 tools/check_conventions.py --base origin/main: passed.python3 tools/pr_overlap.py --branch: no overlap with open pull requests. It also merges cleanly with #21986, which edits another branch of the samesysctlfunction.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 PrivacyOnion on 2026-11-17T01:35:47Z.
Review: APPROVED
Verified on Linux (Ubuntu 24.04, GCC 13.3, Ninja, Release) against
b130917876:tools/check_conventions.pypassed.guest_system_configuration_testsbuilt cleanly.guest_system_configuration):core/libs/prx/libkernel/System/src/SystemConfiguration.cppreverted tomainand the new tests kept, the suite fails: Restoring the change makes it pass again.Looks Good To Me