]> git.baikalelectronics.ru Git - kernel.git/commit
selftests/bpf: Fix error return code in run_getsockopt_test()
authorWang Hai <wanghai38@huawei.com>
Mon, 16 Nov 2020 10:16:33 +0000 (18:16 +0800)
committerDaniel Borkmann <daniel@iogearbox.net>
Mon, 16 Nov 2020 21:19:07 +0000 (22:19 +0100)
commit318bebe969e0890f3e33a0e15f3dff4e4d60e1e7
tree24ff5b1d95c769c49827da05d1b66a514772d046
parent5b005620f22da36bab2671cb4d10ec335e79ea19
selftests/bpf: Fix error return code in run_getsockopt_test()

Fix to return a negative error code from the error handling
case instead of 0, as done elsewhere in this function.

Fixes: 1d4272634fb1 ("selftests/bpf: add sockopt test that exercises BPF_F_ALLOW_MULTI")
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Wang Hai <wanghai38@huawei.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Link: https://lore.kernel.org/bpf/20201116101633.64627-1-wanghai38@huawei.com
tools/testing/selftests/bpf/prog_tests/sockopt_multi.c