HomeFreeBSD

Fix lib/libc/nss/getgr_test with large numbers of groups

Description

Fix lib/libc/nss/getgr_test with large numbers of groups

These tests create a linked list with one entry for every group on the
running system. On a system with about 30,000 groups, the test took 69
seconds to run, and crashed Kyua with the below error:

kyua: E: string or blob too big (sqlite op: sqlite3_bind_blob) (sqlite db: /root/.kyua/store/results.usr_tests.20241231-203317-570235.db).

Fix the test by limiting it to operating on the first 1024 groups.
Apply the same change to getpw_test and getserv_test too, which are
vulnerable to the same problem.

MFC after: 2 weeks
Sponsored by: ConnectWise
Reviewed by: markj
Differential Revision: https://reviews.freebsd.org/D48275

Details

Provenance
asomersAuthored on Tue, Dec 31, 8:41 PM
Reviewer
markj
Differential Revision
D48275: Fix lib/libc/nss/getgr_test with large numbers of groups
Parents
rG3b9da3dcd11f: TCP RACK: avoid using uninitialized tot_idle variable
Branches
Unknown
Tags
Unknown