From: Manu Bretelle <chantr4@gmail.com>
To: Alexei Starovoitov <alexei.starovoitov@gmail.com>
Cc: Kui-Feng Lee <sinquersw@gmail.com>,
Alexei Starovoitov <ast@kernel.org>, bpf <bpf@vger.kernel.org>,
Andrii Nakryiko <andrii@kernel.org>,
Daniel Borkmann <daniel@iogearbox.net>,
Martin KaFai Lau <martin.lau@linux.dev>,
Song Liu <song@kernel.org>,
Yonghong Song <yonghong.song@linux.dev>,
John Fastabend <john.fastabend@gmail.com>,
KP Singh <kpsingh@kernel.org>,
Stanislav Fomichev <sdf@google.com>, Hao Luo <haoluo@google.com>,
Jiri Olsa <jolsa@kernel.org>, Mykola Lysenko <mykolal@fb.com>,
Shuah Khan <shuah@kernel.org>
Subject: Re: [PATCH bpf-next] selftests/bpf: umount children of TDIR in test_bpffs
Date: Fri, 27 Oct 2023 17:56:26 -0700 [thread overview]
Message-ID: <ZTxcOjXbeVsxgs0p@surya> (raw)
In-Reply-To: <CAADnVQ++5v46OYD-zR28dM=PaZ1RYLoijLicg+8DgnAZAZ_qtw@mail.gmail.com>
On Thu, Oct 26, 2023 at 02:35:11PM -0700, Alexei Starovoitov wrote:
> On Tue, Oct 24, 2023 at 10:42 PM Manu Bretelle <chantr4@gmail.com> wrote:
> >
> > On Tue, Oct 24, 2023 at 02:29:19PM -0700, Kui-Feng Lee wrote:
> > >
> > >
> > > On 10/24/23 13:18, Manu Bretelle wrote:
> > > > Currently this tests tries to umount /sys/kernel/debug (TDIR) but the
> > > > system it is running on may have mounts below.
> > > >
> > > > For example, danobi/vmtest [0] VMs have
> > > > mount -t tracefs tracefs /sys/kernel/debug/tracing
> > > > as part of their init.
> > > >
> > > > This change list mounts and will umount any mounts below TDIR before
> > > > umounting TDIR itself.
> > > >
> > > > Note that it is not umounting recursively, so in the case of a sub-mount
> > > > of TDIR having another sub-mount, this will fail as mtab is ordered.
> > >
> > > Should we move TID to a random path likes "/sys/kernel/debug-<pid>/"?
> > >
> >
> > Fair point, I suppose we would want to keep TDIR a defined string as it does
> > simplify the gymnastic involved through the rest of the script, but yeah
> > looking at the original commit:
> > edb65ee5aa25 (selftests/bpf: Add bpffs preload test)
> >
> > I don't see any reason to use an alternate directory and rather mkdir it vs
> > umounting the original one.
> > so something like
> >
> > #define TDIR "/sys/kernel/test_bpffs"
> >
> > Would probably do.
> >
> > Alexei could confirm his original intent probably.
>
> I don't remember why I picked /sys/kernel/debug back then.
> I suspect TDIR /tmp/foo and mkdir would work the same way.
Yeah. I suspect the reason you used an existing directory is that
/sys/kernel is not mutable from userspace.
I ended up picking a random name under /tmp and mkdir.
next prev parent reply other threads:[~2023-10-28 0:56 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-24 20:18 [PATCH bpf-next] selftests/bpf: umount children of TDIR in test_bpffs Manu Bretelle
2023-10-24 21:29 ` Kui-Feng Lee
2023-10-25 5:41 ` Manu Bretelle
2023-10-26 21:35 ` Alexei Starovoitov
2023-10-28 0:56 ` Manu Bretelle [this message]
2023-10-27 6:08 ` Yonghong Song
2023-10-27 21:09 ` Manu Bretelle
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=ZTxcOjXbeVsxgs0p@surya \
--to=chantr4@gmail.com \
--cc=alexei.starovoitov@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=jolsa@kernel.org \
--cc=kpsingh@kernel.org \
--cc=martin.lau@linux.dev \
--cc=mykolal@fb.com \
--cc=sdf@google.com \
--cc=shuah@kernel.org \
--cc=sinquersw@gmail.com \
--cc=song@kernel.org \
--cc=yonghong.song@linux.dev \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox