Re: [RFC PATCH v1 3/5] selftests/filesystems: check that fusectlfs is mounted
Amir Goldstein <[email protected]> Tue, 21 Jul 2026 12:36:54 +0200
| Newsgroups | dev.linux.lists.fuse-devel,org.kernel.vger.linux-kernel,org.kernel.vger.linux-kselftest |
|---|---|
| Message-ID | <CAOQ4uxg6Z3rKYXvjKZ8=rCTM9vXQXiw5M8b3G2zXZ1r7hB7qNA@mail.gmail.com> |
On Wed, Jul 8, 2026 at 3:11=E2=80=AFPM Luis Henriques <[email protected]> wro= te: > > The control filesystem for FUSE needs to be mounted for the fusectl_test = to > be successfully run. Skip the test is that is not the case. > > Signed-off-by: Luis Henriques <[email protected]> Reviewed-by: Amir Goldstein <[email protected]> > --- > tools/testing/selftests/filesystems/fuse/fusectl_test.c | 7 +++++++ > 1 file changed, 7 insertions(+) > > diff --git a/tools/testing/selftests/filesystems/fuse/fusectl_test.c b/to= ols/testing/selftests/filesystems/fuse/fusectl_test.c > index 0d1d012c35ed..2dcfd3ebe0d5 100644 > --- a/tools/testing/selftests/filesystems/fuse/fusectl_test.c > +++ b/tools/testing/selftests/filesystems/fuse/fusectl_test.c > @@ -48,6 +48,7 @@ FIXTURE_SETUP(fusectl) > uid_t uid =3D getuid(); > gid_t gid =3D getgid(); > char buf[32]; > + char path_buf[PATH_MAX]; > > /* Setup userns */ > ASSERT_EQ(unshare(CLONE_NEWNS|CLONE_NEWUSER), 0); > @@ -93,6 +94,12 @@ FIXTURE_SETUP(fusectl) > strerror(errno)); > > self->connection =3D statbuf.st_dev; > + > + sprintf(path_buf, "/sys/fs/fuse/connections/%d", self->connection= ); > + if (access(path_buf, F_OK) !=3D 0) > + SKIP(return, > + "fusectl doesn't seem to be mounted: %s\n", > + strerror(errno)); > } > > FIXTURE_TEARDOWN(fusectl) >