All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH bpf-next] selftests/bpf: select CONFIG_FUNCTION_ERROR_INJECTION
@ 2022-12-13 22:05 Song Liu
  2022-12-13 23:20 ` Daniel Müller
  2022-12-13 23:50 ` patchwork-bot+netdevbpf
  0 siblings, 2 replies; 4+ messages in thread
From: Song Liu @ 2022-12-13 22:05 UTC (permalink / raw)
  To: bpf
  Cc: ast, daniel, andrii, martin.lau, kernel-team, Song Liu,
	Daniel Müller

BPF selftests require CONFIG_FUNCTION_ERROR_INJECTION to work. However,
CONFIG_FUNCTION_ERROR_INJECTION is no longer 'y' by default after [1].
As a result, we are seeing errors like the following from BPF CI:

   bpf_testmod_test_read() is not modifiable
   __x64_sys_setdomainname is not sleepable
   __x64_sys_getpgid is not sleepable

Fix this by explicitly selecting CONFIG_FUNCTION_ERROR_INJECTION in the
selftest config.

[1] commit a4412fdd49dc ("error-injection: Add prompt for function error injection")
Reported-by: Daniel Müller <deso@posteo.net>
Signed-off-by: Song Liu <song@kernel.org>
---
 tools/testing/selftests/bpf/config | 1 +
 1 file changed, 1 insertion(+)

diff --git a/tools/testing/selftests/bpf/config b/tools/testing/selftests/bpf/config
index 612f699dc4f7..5cbc975fd5c8 100644
--- a/tools/testing/selftests/bpf/config
+++ b/tools/testing/selftests/bpf/config
@@ -76,3 +76,4 @@ CONFIG_USERFAULTFD=y
 CONFIG_VXLAN=y
 CONFIG_XDP_SOCKETS=y
 CONFIG_XFRM_INTERFACE=y
+CONFIG_FUNCTION_ERROR_INJECTION=y
\ No newline at end of file
-- 
2.30.2


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH bpf-next] selftests/bpf: select CONFIG_FUNCTION_ERROR_INJECTION
  2022-12-13 22:05 [PATCH bpf-next] selftests/bpf: select CONFIG_FUNCTION_ERROR_INJECTION Song Liu
@ 2022-12-13 23:20 ` Daniel Müller
  2022-12-13 23:27   ` Andrii Nakryiko
  2022-12-13 23:50 ` patchwork-bot+netdevbpf
  1 sibling, 1 reply; 4+ messages in thread
From: Daniel Müller @ 2022-12-13 23:20 UTC (permalink / raw)
  To: Song Liu; +Cc: bpf, ast, daniel, andrii, martin.lau, kernel-team

On Tue, Dec 13, 2022 at 02:05:00PM -0800, Song Liu wrote:
> BPF selftests require CONFIG_FUNCTION_ERROR_INJECTION to work. However,
> CONFIG_FUNCTION_ERROR_INJECTION is no longer 'y' by default after [1].
> As a result, we are seeing errors like the following from BPF CI:
> 
>    bpf_testmod_test_read() is not modifiable
>    __x64_sys_setdomainname is not sleepable
>    __x64_sys_getpgid is not sleepable
> 
> Fix this by explicitly selecting CONFIG_FUNCTION_ERROR_INJECTION in the
> selftest config.
> 
> [1] commit a4412fdd49dc ("error-injection: Add prompt for function error injection")
> Reported-by: Daniel Müller <deso@posteo.net>
> Signed-off-by: Song Liu <song@kernel.org>
> ---
>  tools/testing/selftests/bpf/config | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/tools/testing/selftests/bpf/config b/tools/testing/selftests/bpf/config
> index 612f699dc4f7..5cbc975fd5c8 100644
> --- a/tools/testing/selftests/bpf/config
> +++ b/tools/testing/selftests/bpf/config
> @@ -76,3 +76,4 @@ CONFIG_USERFAULTFD=y
>  CONFIG_VXLAN=y
>  CONFIG_XDP_SOCKETS=y
>  CONFIG_XFRM_INTERFACE=y
> +CONFIG_FUNCTION_ERROR_INJECTION=y
> \ No newline at end of file

Thanks for the fix! I believe we try to keep the file sorted (although I do see
one violation) to make it easy to diff against arch specific configs but also to
minimize the risk of merge conflicts (more likely if everybody appends). Would
you mind sorting the addition in?

Looks good to me otherwise.

Acked-by: Daniel Müller <deso@posteo.net>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH bpf-next] selftests/bpf: select CONFIG_FUNCTION_ERROR_INJECTION
  2022-12-13 23:20 ` Daniel Müller
@ 2022-12-13 23:27   ` Andrii Nakryiko
  0 siblings, 0 replies; 4+ messages in thread
From: Andrii Nakryiko @ 2022-12-13 23:27 UTC (permalink / raw)
  To: Daniel Müller
  Cc: Song Liu, bpf, ast, daniel, andrii, martin.lau, kernel-team

On Tue, Dec 13, 2022 at 3:21 PM Daniel Müller <deso@posteo.net> wrote:
>
> On Tue, Dec 13, 2022 at 02:05:00PM -0800, Song Liu wrote:
> > BPF selftests require CONFIG_FUNCTION_ERROR_INJECTION to work. However,
> > CONFIG_FUNCTION_ERROR_INJECTION is no longer 'y' by default after [1].
> > As a result, we are seeing errors like the following from BPF CI:
> >
> >    bpf_testmod_test_read() is not modifiable
> >    __x64_sys_setdomainname is not sleepable
> >    __x64_sys_getpgid is not sleepable
> >
> > Fix this by explicitly selecting CONFIG_FUNCTION_ERROR_INJECTION in the
> > selftest config.
> >
> > [1] commit a4412fdd49dc ("error-injection: Add prompt for function error injection")
> > Reported-by: Daniel Müller <deso@posteo.net>
> > Signed-off-by: Song Liu <song@kernel.org>
> > ---
> >  tools/testing/selftests/bpf/config | 1 +
> >  1 file changed, 1 insertion(+)
> >
> > diff --git a/tools/testing/selftests/bpf/config b/tools/testing/selftests/bpf/config
> > index 612f699dc4f7..5cbc975fd5c8 100644
> > --- a/tools/testing/selftests/bpf/config
> > +++ b/tools/testing/selftests/bpf/config
> > @@ -76,3 +76,4 @@ CONFIG_USERFAULTFD=y
> >  CONFIG_VXLAN=y
> >  CONFIG_XDP_SOCKETS=y
> >  CONFIG_XFRM_INTERFACE=y
> > +CONFIG_FUNCTION_ERROR_INJECTION=y
> > \ No newline at end of file
>
> Thanks for the fix! I believe we try to keep the file sorted (although I do see
> one violation) to make it easy to diff against arch specific configs but also to
> minimize the risk of merge conflicts (more likely if everybody appends). Would
> you mind sorting the addition in?
>
> Looks good to me otherwise.
>
> Acked-by: Daniel Müller <deso@posteo.net>

I've fixed up the patch (order, added Fixes: tag, etc) locally. But
I'm waiting for CI to confirm. Song, no need to resubmit this, but
please add a custom patch to BPF CI, so that this applies to both bpf
and bpf-next trees. Thanks!

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH bpf-next] selftests/bpf: select CONFIG_FUNCTION_ERROR_INJECTION
  2022-12-13 22:05 [PATCH bpf-next] selftests/bpf: select CONFIG_FUNCTION_ERROR_INJECTION Song Liu
  2022-12-13 23:20 ` Daniel Müller
@ 2022-12-13 23:50 ` patchwork-bot+netdevbpf
  1 sibling, 0 replies; 4+ messages in thread
From: patchwork-bot+netdevbpf @ 2022-12-13 23:50 UTC (permalink / raw)
  To: Song Liu; +Cc: bpf, ast, daniel, andrii, martin.lau, kernel-team, deso

Hello:

This patch was applied to bpf/bpf-next.git (master)
by Andrii Nakryiko <andrii@kernel.org>:

On Tue, 13 Dec 2022 14:05:00 -0800 you wrote:
> BPF selftests require CONFIG_FUNCTION_ERROR_INJECTION to work. However,
> CONFIG_FUNCTION_ERROR_INJECTION is no longer 'y' by default after [1].
> As a result, we are seeing errors like the following from BPF CI:
> 
>    bpf_testmod_test_read() is not modifiable
>    __x64_sys_setdomainname is not sleepable
>    __x64_sys_getpgid is not sleepable
> 
> [...]

Here is the summary with links:
  - [bpf-next] selftests/bpf: select CONFIG_FUNCTION_ERROR_INJECTION
    https://git.kernel.org/bpf/bpf-next/c/e561fc8365da

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] 4+ messages in thread

end of thread, other threads:[~2022-12-13 23:50 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-12-13 22:05 [PATCH bpf-next] selftests/bpf: select CONFIG_FUNCTION_ERROR_INJECTION Song Liu
2022-12-13 23:20 ` Daniel Müller
2022-12-13 23:27   ` Andrii Nakryiko
2022-12-13 23:50 ` patchwork-bot+netdevbpf

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.