From: Jiri Olsa <olsajiri@gmail.com>
To: Stanislav Fomichev <sdf@google.com>
Cc: bpf@vger.kernel.org, ast@kernel.org, daniel@iogearbox.net,
andrii@kernel.org, martin.lau@linux.dev, song@kernel.org,
yhs@fb.com, john.fastabend@gmail.com, kpsingh@kernel.org,
haoluo@google.com, Jiri Olsa <olsajiri@gmail.com>
Subject: Re: [PATCH bpf-next] selftests/bpf: Mount debugfs in setns_by_fd
Date: Wed, 23 Nov 2022 22:21:28 +0100 [thread overview]
Message-ID: <Y36O2PrkL8t526vC@krava> (raw)
In-Reply-To: <20221123200829.2226254-1-sdf@google.com>
On Wed, Nov 23, 2022 at 12:08:29PM -0800, Stanislav Fomichev wrote:
> Jiri reports broken test_progs after recent commit 68f8e3d4b916
> ("selftests/bpf: Make sure zero-len skbs aren't redirectable").
> Apparently we don't remount debugfs when we switch back networking namespace.
> Let's explicitly mount /sys/kernel/debug.
>
> 0: https://lore.kernel.org/bpf/63b85917-a2ea-8e35-620c-808560910819@meta.com/T/#ma66ca9c92e99eee0a25e40f422489b26ee0171c1
>
> Fixes: a30338840fa5 ("selftests/bpf: Move open_netns() and close_netns() into network_helpers.c")
> Reported-by: Jiri Olsa <olsajiri@gmail.com>
> Signed-off-by: Stanislav Fomichev <sdf@google.com>
Acked-by: Jiri Olsa <olsajiri@gmail.com>
Tested-by: Jiri Olsa <olsajiri@gmail.com>
thanks,
jirka
> ---
> tools/testing/selftests/bpf/network_helpers.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/tools/testing/selftests/bpf/network_helpers.c b/tools/testing/selftests/bpf/network_helpers.c
> index bec15558fd93..1f37adff7632 100644
> --- a/tools/testing/selftests/bpf/network_helpers.c
> +++ b/tools/testing/selftests/bpf/network_helpers.c
> @@ -426,6 +426,10 @@ static int setns_by_fd(int nsfd)
> if (!ASSERT_OK(err, "mount /sys/fs/bpf"))
> return err;
>
> + err = mount("debugfs", "/sys/kernel/debug", "debugfs", 0, NULL);
> + if (!ASSERT_OK(err, "mount /sys/kernel/debug"))
> + return err;
> +
> return 0;
> }
>
> --
> 2.38.1.584.g0f3c55d4c2-goog
>
prev parent reply other threads:[~2022-11-23 21:21 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-23 20:08 [PATCH bpf-next] selftests/bpf: Mount debugfs in setns_by_fd Stanislav Fomichev
2022-11-23 20:39 ` Alexei Starovoitov
2022-11-23 22:38 ` Stanislav Fomichev
2022-11-23 23:31 ` Alexei Starovoitov
2022-11-24 0:08 ` Stanislav Fomichev
2022-11-23 20:40 ` patchwork-bot+netdevbpf
2022-11-23 21:21 ` Jiri Olsa [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Y36O2PrkL8t526vC@krava \
--to=olsajiri@gmail.com \
--cc=andrii@kernel.org \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=haoluo@google.com \
--cc=john.fastabend@gmail.com \
--cc=kpsingh@kernel.org \
--cc=martin.lau@linux.dev \
--cc=sdf@google.com \
--cc=song@kernel.org \
--cc=yhs@fb.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.