]> git.baikalelectronics.ru Git - kernel.git/commit
selftests/bpf: Skip loading bpf_testmod when using -l to list tests.
authorYucong Sun <fallentree@fb.com>
Tue, 17 Aug 2021 04:47:29 +0000 (21:47 -0700)
committerAndrii Nakryiko <andrii@kernel.org>
Tue, 17 Aug 2021 18:16:27 +0000 (11:16 -0700)
commitff33a10174b44ba9df65ee5aea6ab29f7413ed1d
tree1ffa79571054c11b54194d146b818278fcbad04a
parent490d5abd5cb7ff74f48e34c7553d1d50335b8fc3
selftests/bpf: Skip loading bpf_testmod when using -l to list tests.

When using "-l", test_progs often is executed as non-root user,
load_bpf_testmod() will fail and output errors. This patch skips loading bpf
testmod when "-l" is specified, making output cleaner.

Signed-off-by: Yucong Sun <fallentree@fb.com>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/bpf/20210817044732.3263066-2-fallentree@fb.com
tools/testing/selftests/bpf/test_progs.c