]> asedeno.scripts.mit.edu Git - linux.git/commit
tools/bpf: adjust rlimit RLIMIT_MEMLOCK for test_tcpbpf_user
authorYonghong Song <yhs@fb.com>
Tue, 13 Feb 2018 18:35:05 +0000 (10:35 -0800)
committerAlexei Starovoitov <ast@kernel.org>
Wed, 14 Feb 2018 02:02:02 +0000 (18:02 -0800)
commit615a9474985799c8b48645b8e95a9b9f0691f56a
treec570e610ad6b8d6d522d881e0012ffb39e20bac6
parent41757dcb0c3d8446c549e55163c9fd9561fcf599
tools/bpf: adjust rlimit RLIMIT_MEMLOCK for test_tcpbpf_user

The default rlimit RLIMIT_MEMLOCK is 64KB. In certain cases,
e.g. in a test machine mimicking our production system, this test may
fail due to unable to charge the required memory for map creation:
   # ./test_tcpbpf_user
   libbpf: failed to create map (name: 'global_map'): Operation not permitted
   libbpf: failed to load object 'test_tcpbpf_kern.o'
   FAILED: load_bpf_file failed for: test_tcpbpf_kern.o

Changing the default rlimit RLIMIT_MEMLOCK to unlimited makes
the test always pass.

Signed-off-by: Yonghong Song <yhs@fb.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
tools/testing/selftests/bpf/test_tcpbpf_user.c