]> CyberLeo.Net >> Repos - FreeBSD/stable/10.git/commit
MFC r294894:
authorngie <ngie@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Sat, 12 Mar 2016 19:05:49 +0000 (19:05 +0000)
committerngie <ngie@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Sat, 12 Mar 2016 19:05:49 +0000 (19:05 +0000)
commit1d4b3f7ae7b112aed75c06246a320a7cafbf8b0d
treede2ccd54c701fedac36c377bc125f7c4ca06d37e
parent2da4ee365fb30320bd03135aec9850ac61a0aab0
MFC r294894:

Adjust vm.max_wired in order to avoid hitting EAGAIN artificially

Set vm.max_wired to INT_MAX in :mlock_err, :mlock_mmap, and :mlock_nested to
avoid hitting EAGAIN artificially on the system when running the tests

Require root privileges in order to set the sysctl

Add allow_sysctl_side_effects to require.config as this test is now adjusting
sysctls that can affect the global system state

Unlike the version submitted by cem in OneFS, this version uses a scratch file
to save/restore the previous value of the sysctl. I _really_, _really_ wish
there were better hooks in atf/kyua for per test suite setup/teardown -- using
a file is kludgy, but it's the best I can do to avoid situations where (for
instance), sysctl(3) may fail and drop a core outside the kyua sandbox.

Based on a patch submitted by cem, but modified to take business logic out of
ATF_TP_ADD_TCS(3).

git-svn-id: svn://svn.freebsd.org/base/stable/10@296750 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
contrib/netbsd-tests/lib/libc/sys/t_mlock.c