All of lore.kernel.org
 help / color / mirror / Atom feed
* [LTP] [PATCH] df01: detect "fuse" fstype in addition to "fuseblk"
@ 2026-07-01 11:00 Vasileios Almpanis via ltp
  2026-07-01 12:22 ` [LTP] " linuxtestproject.agent
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: Vasileios Almpanis via ltp @ 2026-07-01 11:00 UTC (permalink / raw)
  To: ltp

df01.sh derives DF_FS_TYPE by matching the test mount in /proc/mounts
against either the real FS type or "fuseblk", the type used when
ntfs-3g/FUSE mounts a block device via the privileged blkdev path.

However, when the filesystem is mounted from inside a user namespace or
an unprivileged/virtualized container, that path is unavailable: the
kernel's fuseblk file_system_type lacks FS_USERNS_MOUNT and requires
FS_REQUIRES_DEV, so libfuse/ntfs-3g falls back to a plain anonymous
mount and the kernel reports the type as "fuse" instead of "fuseblk":

  /dev/loop0 /mnt fuse rw,relatime,user_id=0,group_id=0,allow_other

In that case the grep matches nothing and DF_FS_TYPE becomes empty,
which breaks two subtests:

  test5:  "df -t $DF_FS_TYPE -P" collapses to "df -t -P"; -t consumes
          -P as its type argument -> "df: no file systems processed",
          non-zero exit -> TFAIL.
  test12: "df -x $DF_FS_TYPE -P" collapses to "df -x -P"; the device is
          no longer excluded and appears in the output -> TFAIL.

Add "fuse" so the containerized/userns FUSE mount is detected too.

Signed-off-by: Vasileios Almpanis <vasileios.almpanis@virtuozzo.com>
---
 testcases/commands/df/df01.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/testcases/commands/df/df01.sh b/testcases/commands/df/df01.sh
index 5af4f68e6..72b02ce34 100755
--- a/testcases/commands/df/df01.sh
+++ b/testcases/commands/df/df01.sh
@@ -15,7 +15,7 @@ TST_NEEDS_ROOT=1
 
 setup()
 {
-	DF_FS_TYPE="$(grep -E "$TST_MNTPOINT ($TST_FS_TYPE|fuseblk)" /proc/mounts | awk 'NR==1{print $3}')"
+	DF_FS_TYPE="$(grep -E "$TST_MNTPOINT ($TST_FS_TYPE|fuseblk|fuse)" /proc/mounts | awk 'NR==1{print $3}')"
 }
 
 df_test()
-- 
2.47.3


-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

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

end of thread, other threads:[~2026-07-07 10:30 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-01 11:00 [LTP] [PATCH] df01: detect "fuse" fstype in addition to "fuseblk" Vasileios Almpanis via ltp
2026-07-01 12:22 ` [LTP] " linuxtestproject.agent
2026-07-01 18:17 ` [LTP] [PATCH] " Avinesh Kumar via ltp
2026-07-02  8:39 ` Andrea Cervesato via ltp
2026-07-02  8:40 ` Andrea Cervesato via ltp
2026-07-07 10:29 ` Cyril Hrubis

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.