]> git.baikalelectronics.ru Git - kernel.git/commit
selftests/bpf: Fix attach tests retcode checks
authorArtem Savkov <asavkov@redhat.com>
Thu, 21 Apr 2022 13:01:04 +0000 (15:01 +0200)
committerDaniel Borkmann <daniel@iogearbox.net>
Thu, 21 Apr 2022 14:34:55 +0000 (16:34 +0200)
commit7ec08e3cc1796d81f03e3ada1b8349975bfd7a0f
tree020352f368979bfde1c743492799e0da57e8e428
parenta2a132db9abb4e4ba2bb9fb7d456530e606108bf
selftests/bpf: Fix attach tests retcode checks

Switching to libbpf 1.0 API broke test_sock and test_sysctl as they
check for return of bpf_prog_attach to be exactly -1. Switch the check
to '< 0' instead.

Fixes: 4736ae2a0a39 ("selftests/bpf: Use libbpf 1.0 API mode instead of RLIMIT_MEMLOCK")
Signed-off-by: Artem Savkov <asavkov@redhat.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Reviewed-by: Yafang Shao <laoar.shao@gmail.com>
Link: https://lore.kernel.org/bpf/20220421130104.1582053-1-asavkov@redhat.com
tools/testing/selftests/bpf/test_sock.c
tools/testing/selftests/bpf/test_sysctl.c