Skip to contentSkip to conversation

selftests/landlock: Add 9p and FUSE filesystem tests

PATCH New Mickaël Salaün 1 participant 1 message Jul 4, 2025

Subsystems (5)
lore
Share & tools
lore

Mickaël Salaün

author maintainer
#0 lore raw

PATCH 1/1 selftests/landlock: Add 9p and FUSE filesystem tests

FUSE is already supported but v9fs requires some fixes [1].

These tests require /mnt/test-v9fs and /mnt/test-fuse to be already mounted. It would be too complex to set up such mount points with the test fixtures because of the related daemons' lifetime, but it is easy to run these tests with check-linux.sh from landlock-test-tools [2].

Add new kernel configurations to support these two new filesystems.

Rename and update path_is_fs() to take a path as argument.

---
 tools/testing/selftests/landlock/config    |  5 +++
 tools/testing/selftests/landlock/fs_test.c | 45 ++++++++++++++++++----
 2 files changed, 43 insertions(+), 7 deletions(-)
tools/testing/selftests/landlock/config +5 -0
index 8fe9b461b1fd..02427db3cb7b 100644
@@ -1,13 +1,18 @@
+CONFIG_9P_FS=y
 CONFIG_AF_UNIX_OOB=y
 CONFIG_AUDIT=y
 CONFIG_CGROUPS=y
 CONFIG_CGROUP_SCHED=y
+CONFIG_FUSE_FS=y
 CONFIG_INET=y
 CONFIG_IPV6=y
 CONFIG_KEYS=y
 CONFIG_MPTCP=y
 CONFIG_MPTCP_IPV6=y
 CONFIG_NET=y
+CONFIG_NETWORK_FILESYSTEMS=y
+CONFIG_NET_9P=y
+CONFIG_NET_9P_FD=y
 CONFIG_NET_NS=y
 CONFIG_OVERLAY_FS=y
 CONFIG_PROC_FS=y
tools/testing/selftests/landlock/fs_test.c +38 -7

74 lines not on this page · raw message

Signature · 1 line
2.50.0