freebsd-nq/contrib/netbsd-tests
Enji Cooper cc7734cbac 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"

MFC after:	2 weeks
2016-12-10 22:08:33 +00:00
..
bin Checkpoint initial integration work 2016-08-12 08:50:05 +00:00
crypto Checkpoint initial integration work 2016-08-12 08:50:05 +00:00
dev Checkpoint initial integration work 2016-08-12 08:50:05 +00:00
fs Use _test_unmount instead of test_unmount in cleanup to avoid 2016-12-09 23:44:25 +00:00
games Restore pathing for factor(1), which unnecessarily diverged in r278616 2016-12-03 03:13:32 +00:00
include Checkpoint initial integration work 2016-08-12 08:50:05 +00:00
ipf Checkpoint initial integration work 2016-08-12 08:50:05 +00:00
kernel Fix tests/sys/kqueue NetBSD tests on 32-bit platforms by using proper 2016-09-06 17:22:25 +00:00
lib Change the process limits for RLIMIT_MEMLOCK to RLIM_INFINITY when 2016-12-10 22:08:33 +00:00
libexec/ld.elf_so
modules
net Checkpoint initial integration work 2016-08-12 08:50:05 +00:00
rump Checkpoint initial integration work 2016-08-12 08:50:05 +00:00
sbin Checkpoint initial integration work 2016-08-12 08:50:05 +00:00
share Checkpoint initial integration work 2016-08-12 08:50:05 +00:00
sys Checkpoint initial integration work 2016-08-12 08:50:05 +00:00
usr.bin Remove expected failure for :basic (effectively reverting r305007, r305031) 2016-09-19 06:39:08 +00:00
usr.sbin Checkpoint initial integration work 2016-08-12 08:50:05 +00:00
FREEBSD-upgrade
h_macros.h Checkpoint initial integration work 2016-08-12 08:50:05 +00:00