diff options
author | ngie <ngie@FreeBSD.org> | 2016-12-24 13:00:19 +0000 |
---|---|---|
committer | ngie <ngie@FreeBSD.org> | 2016-12-24 13:00:19 +0000 |
commit | f2b18f54acdee9eddb6bdd84e2aca25a45b809e4 (patch) | |
tree | f25d18e665a16fee76239d90fa465c8e486f1d72 /contrib/netbsd-tests/lib/libc/regex/t_exhaust.c | |
parent | 78047153f3f320f60a8264a8a33abb8636dbfc7c (diff) | |
download | FreeBSD-src-f2b18f54acdee9eddb6bdd84e2aca25a45b809e4.zip FreeBSD-src-f2b18f54acdee9eddb6bdd84e2aca25a45b809e4.tar.gz |
MFstable/11 r310506:
MFC r309837:
Change the process limits for RLIMIT_MEMLOCK to RLIM_INFINITY when
executing :mincore_resid
The default process limits in FreeBSD is 64kB for unprivileged users,
which empirically is too low to run the :mincore_resid testcase.
Process limits are inherited, so even though the default limit for
root users is RLIM_INFINITY, the inherited limit with "sudo" with the
default login.conf will be 64kB.
Use setrlimit to set rlim_max for RLIMIT_MEMLOCK to RLIM_INFINITY to
avoid ENOMEM issues when calling mlock to wire the mmap'ed address
space.
setrlimit requires root access to increase rlim_max, so require root
privileges when running the test
Discovered when executing the tests with sudo, e.g.
"sudo kyua test -k /usr/tests/lib/libc/sys/Kyuafile mincore_test"
Diffstat (limited to 'contrib/netbsd-tests/lib/libc/regex/t_exhaust.c')
0 files changed, 0 insertions, 0 deletions