* [PATCH bpf-next] selftests/bpf: skip module_fentry_shadow test when bpf_testmod is not available
@ 2023-09-14 12:49 Artem Savkov
2023-09-14 18:17 ` Andrii Nakryiko
2023-09-14 18:20 ` patchwork-bot+netdevbpf
0 siblings, 2 replies; 3+ messages in thread
From: Artem Savkov @ 2023-09-14 12:49 UTC (permalink / raw)
To: Alexei Starovoitov, Daniel Borkmann, Andrii Nakryiko, bpf, netdev
Cc: vmalik, linux-kernel, Artem Savkov
This test relies on bpf_testmod, so skip it if the module is not available.
Fixes: aa3d65de4b900 ("bpf/selftests: Test fentry attachment to shadowed functions")
Signed-off-by: Artem Savkov <asavkov@redhat.com>
---
.../testing/selftests/bpf/prog_tests/module_fentry_shadow.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/tools/testing/selftests/bpf/prog_tests/module_fentry_shadow.c b/tools/testing/selftests/bpf/prog_tests/module_fentry_shadow.c
index c7636e18b1ebd..cdd55e5340dec 100644
--- a/tools/testing/selftests/bpf/prog_tests/module_fentry_shadow.c
+++ b/tools/testing/selftests/bpf/prog_tests/module_fentry_shadow.c
@@ -61,6 +61,11 @@ void test_module_fentry_shadow(void)
int link_fd[2] = {};
__s32 btf_id[2] = {};
+ if (!env.has_testmod) {
+ test__skip();
+ return;
+ }
+
LIBBPF_OPTS(bpf_prog_load_opts, load_opts,
.expected_attach_type = BPF_TRACE_FENTRY,
);
--
2.41.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH bpf-next] selftests/bpf: skip module_fentry_shadow test when bpf_testmod is not available
2023-09-14 12:49 [PATCH bpf-next] selftests/bpf: skip module_fentry_shadow test when bpf_testmod is not available Artem Savkov
@ 2023-09-14 18:17 ` Andrii Nakryiko
2023-09-14 18:20 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: Andrii Nakryiko @ 2023-09-14 18:17 UTC (permalink / raw)
To: Artem Savkov
Cc: Alexei Starovoitov, Daniel Borkmann, Andrii Nakryiko, bpf, netdev,
vmalik, linux-kernel
On Thu, Sep 14, 2023 at 5:49 AM Artem Savkov <asavkov@redhat.com> wrote:
>
> This test relies on bpf_testmod, so skip it if the module is not available.
>
> Fixes: aa3d65de4b900 ("bpf/selftests: Test fentry attachment to shadowed functions")
> Signed-off-by: Artem Savkov <asavkov@redhat.com>
> ---
> .../testing/selftests/bpf/prog_tests/module_fentry_shadow.c | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/tools/testing/selftests/bpf/prog_tests/module_fentry_shadow.c b/tools/testing/selftests/bpf/prog_tests/module_fentry_shadow.c
> index c7636e18b1ebd..cdd55e5340dec 100644
> --- a/tools/testing/selftests/bpf/prog_tests/module_fentry_shadow.c
> +++ b/tools/testing/selftests/bpf/prog_tests/module_fentry_shadow.c
> @@ -61,6 +61,11 @@ void test_module_fentry_shadow(void)
> int link_fd[2] = {};
> __s32 btf_id[2] = {};
>
> + if (!env.has_testmod) {
> + test__skip();
> + return;
> + }
> +
you used spaces for indentation, please don't do that. It was also
obvious if you looked at patchworks status ([0]). I fixed it up while
applying, but keep this in mind for the future. Thanks.
[0] https://patchwork.kernel.org/project/netdevbpf/patch/20230914124928.340701-1-asavkov@redhat.com/
> LIBBPF_OPTS(bpf_prog_load_opts, load_opts,
> .expected_attach_type = BPF_TRACE_FENTRY,
> );
> --
> 2.41.0
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH bpf-next] selftests/bpf: skip module_fentry_shadow test when bpf_testmod is not available
2023-09-14 12:49 [PATCH bpf-next] selftests/bpf: skip module_fentry_shadow test when bpf_testmod is not available Artem Savkov
2023-09-14 18:17 ` Andrii Nakryiko
@ 2023-09-14 18:20 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+netdevbpf @ 2023-09-14 18:20 UTC (permalink / raw)
To: Artem Savkov; +Cc: ast, daniel, andrii, bpf, netdev, vmalik, linux-kernel
Hello:
This patch was applied to bpf/bpf-next.git (master)
by Andrii Nakryiko <andrii@kernel.org>:
On Thu, 14 Sep 2023 14:49:28 +0200 you wrote:
> This test relies on bpf_testmod, so skip it if the module is not available.
>
> Fixes: aa3d65de4b900 ("bpf/selftests: Test fentry attachment to shadowed functions")
> Signed-off-by: Artem Savkov <asavkov@redhat.com>
> ---
> .../testing/selftests/bpf/prog_tests/module_fentry_shadow.c | 5 +++++
> 1 file changed, 5 insertions(+)
Here is the summary with links:
- [bpf-next] selftests/bpf: skip module_fentry_shadow test when bpf_testmod is not available
https://git.kernel.org/bpf/bpf-next/c/971f7c32147f
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-09-14 18:20 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-09-14 12:49 [PATCH bpf-next] selftests/bpf: skip module_fentry_shadow test when bpf_testmod is not available Artem Savkov
2023-09-14 18:17 ` Andrii Nakryiko
2023-09-14 18:20 ` patchwork-bot+netdevbpf
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox