selftests/bpf: don't exit on failed bpf_testmod unload
Subsystems (5)
Andrii Nakryiko
maintainerPATCH 1/1 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().
--- tools/testing/selftests/bpf/test_progs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
tools/testing/selftests/bpf/test_progs.c +1 -1
@@ -390,7 +390,7 @@ static void unload_bpf_testmod(void)return ; }fprintf (env.stderr,"Failed to unload bpf_testmod.ko from kernel: %d\n" , -errno); -exit (1 ); +return ; }if (env.verbosity >VERBOSE_NONE )fprintf (stdout,"Successfully unloaded bpf_testmod.ko.\n" );
Signature · 1 line
2.24.1
This patch was applied to bpf/bpf-next.git (refs/heads/master):
Hello:
This patch was applied to bpf/bpf-next.git (refs/heads/master):
Quoted 10 lines · On Mon, 25 Jan 2021 22:50:18 -0800 you wrote:
Fix bug in handling
bpf_testmodunloading that will causetest_progsexiting prematurely ifbpf_testmodunloading failed. This is especially problematic when running a subset oftest_progsthat doesn't require root permissions and doesn't rely onbpf_testmod, yet will fail immediately due to exit(1) inunload_bpf_testmod().Fixes 9f7fa225894c ("selftests/bpf: Add bpf_testmod kernel module for testing")Signed-off-by Andrii Nakryiko <[email protected]>[...]
Here is the summary with links:
- [bpf-next] selftests/bpf: don't exit on failed bpf_testmod unload
https://git.kernel.org/bpf/bpf-next/c/86ce322d21eb
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html