Yonghong Song 3e1a61b30c tools/bpf: fix test_sockmap failure
On one of our production test machine, when running
bpf selftest test_sockmap, I got the following error:
  # sudo ./test_sockmap
  libbpf: failed to create map (name: 'sock_map'): Operation not permitted
  libbpf: failed to load object 'test_sockmap_kern.o'
  libbpf: Can't get the 0th fd from program sk_skb1: only -1 instances
  ......
  load_bpf_file: (-1) Operation not permitted
  ERROR: (-1) load bpf failed

The error is due to not-big-enough rlimit
  struct rlimit r = {10 * 1024 * 1024, RLIM_INFINITY};

The test already includes "bpf_rlimit.h", which sets current
and max rlimit to RLIM_INFINITY. Let us just use it.

Signed-off-by: Yonghong Song <yhs@fb.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
2018-06-22 00:31:42 +02:00
..
2018-03-18 17:48:59 +01:00
2018-06-15 18:10:01 -03:00
2018-06-15 18:10:01 -03:00
2018-06-15 18:10:01 -03:00
2018-06-15 18:10:01 -03:00
2018-05-07 07:15:41 +02:00
2018-06-07 17:34:37 -07:00
2017-11-18 10:26:57 -08:00