]> git.baikalelectronics.ru Git - kernel.git/commit
selftests/bpf: Don't exit on failed bpf_testmod unload
authorAndrii Nakryiko <andrii@kernel.org>
Tue, 26 Jan 2021 06:50:18 +0000 (22:50 -0800)
committerDaniel Borkmann <daniel@iogearbox.net>
Tue, 26 Jan 2021 16:02:00 +0000 (17:02 +0100)
commit40ff6cdf0f32bedd7314ad6272d6eafa9f1385c8
treeb3def3a5fdb402d7fa70c05ed80c535b9f4b7397
parent5606607cdae51edd5f38eae03576aa2480a1f21b
selftests/bpf: Don't exit on failed bpf_testmod unload

Fix bug in handling bpf_testmod unloading that will cause test_progs exiting
prematurely if bpf_testmod unloading failed. This is especially problematic
when running a subset of test_progs that doesn't require root permissions and
doesn't rely on bpf_testmod, yet will fail immediately due to exit(1) in
unload_bpf_testmod().

Fixes: 0cc2e5c9cd07 ("selftests/bpf: Add bpf_testmod kernel module for testing")
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Link: https://lore.kernel.org/bpf/20210126065019.1268027-1-andrii@kernel.org
tools/testing/selftests/bpf/test_progs.c