• Yonghong Song's avatar
    tools/bpf: adjust rlimit RLIMIT_MEMLOCK for test_tcpbpf_user · 615a9474
    Yonghong Song authored
    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: default avatarYonghong Song <yhs@fb.com>
    Signed-off-by: default avatarAlexei Starovoitov <ast@kernel.org>
    615a9474
test_tcpbpf_user.c 3.21 KB