diff options
author | Daniel Borkmann <daniel@iogearbox.net> | 2018-02-26 22:34:32 +0100 |
---|---|---|
committer | Alexei Starovoitov <ast@kernel.org> | 2018-02-26 20:11:23 -0800 |
commit | fe8d662aef26394388bfcd3b96ce123b6d33044b (patch) | |
tree | c236669015f5b2b435d0283f3d6f62f30cdc552c /tools/testing/selftests/bpf/test_maps.c | |
parent | Merge branch '10GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/next-queue (diff) | |
download | linux-dev-fe8d662aef26394388bfcd3b96ce123b6d33044b.tar.xz linux-dev-fe8d662aef26394388bfcd3b96ce123b6d33044b.zip |
bpf: unify rlimit handling in selftests
Unify memlock handling into bpf_rlimit.h and replace all occurences
in BPF kselftests with it.
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: Alexei Starovoitov <ast@kernel.org>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to '')
-rw-r--r-- | tools/testing/selftests/bpf/test_maps.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/tools/testing/selftests/bpf/test_maps.c b/tools/testing/selftests/bpf/test_maps.c index 9e03a4c356a4..1238733c5b33 100644 --- a/tools/testing/selftests/bpf/test_maps.c +++ b/tools/testing/selftests/bpf/test_maps.c @@ -17,13 +17,14 @@ #include <stdlib.h> #include <sys/wait.h> -#include <sys/resource.h> #include <linux/bpf.h> #include <bpf/bpf.h> #include <bpf/libbpf.h> + #include "bpf_util.h" +#include "bpf_rlimit.h" static int map_flags; @@ -1126,10 +1127,6 @@ static void run_all_tests(void) int main(void) { - struct rlimit rinf = { RLIM_INFINITY, RLIM_INFINITY }; - - setrlimit(RLIMIT_MEMLOCK, &rinf); - map_flags = 0; run_all_tests(); |