public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
From: Cyril Hrubis <chrubis@suse.cz>
To: Matt Ochs <mochs@nvidia.com>
Cc: "ltp@lists.linux.it" <ltp@lists.linux.it>
Subject: Re: [LTP] [PATCH] syscalls: file_attr05: skip ntfs filesystem
Date: Fri, 10 Apr 2026 12:04:11 +0200	[thread overview]
Message-ID: <adjLGwviRoTSsbgH@yuki.lan> (raw)
In-Reply-To: <30B73CA1-6AD3-4926-9E73-3FF5423F34A0@nvidia.com>

Hi!
> > When I run the test I see:
> >
> > ...
> > tst_supported_fs_types.c:165: TINFO: Skipping FUSE based ntfs as requested by the test
> > ...
> >
> > So likely something else is at play here. Are you sure you are dealing
> > with a fuse based ntfs or with the kernel based implementation?
> >
>
> On Ubuntu, ntfs3 is available as a kernel module, so
> has_kernel_support() in tst_supported_fs_types.c probes the kernel
> mount, succeeds, and returns TST_FS_KERNEL immediately — never
> reaching the FUSE detection path. As a result, the existing "fuse"
> skip doesn't fire even though safe_macros always mounts ntfs via FUSE
> anyway.

I think I've figured it out. The ntfs driver in kernel is the old
read-only one and ntfs3 is the new read-write kernel driver.

What we can do in the library is to fix the ntfs driver to be always
handled by fuse and add ntfs3 that is the read-write kernel driver. With
that we will fix this test but also enable more coverage.

This works for me:

diff --git a/lib/tst_mkfs.c b/lib/tst_mkfs.c
index c619a373d..961ffc091 100644
--- a/lib/tst_mkfs.c
+++ b/lib/tst_mkfs.c
@@ -50,6 +50,9 @@ void tst_mkfs_(const char *file, const int lineno, void (cleanup_fn)(void),
                return;
        }

+       if (!strcmp(fs_type, "ntfs3"))
+               fs_type = "ntfs";
+
        snprintf(mkfs, sizeof(mkfs), "mkfs.%s", fs_type);

        if (fs_opts) {
diff --git a/lib/tst_supported_fs_types.c b/lib/tst_supported_fs_types.c
index 0c8c8dc50..d3020fc48 100644
--- a/lib/tst_supported_fs_types.c
+++ b/lib/tst_supported_fs_types.c
@@ -30,6 +30,7 @@ static const char *const fs_type_whitelist[] = {
        "vfat",
        "exfat",
        "ntfs",
+       "ntfs3",
        "tmpfs",
        NULL
 };
@@ -51,6 +52,9 @@ static int has_mkfs(const char *fs_type)
                return 1;
        }

+       if (!strcmp(fs_type, "ntfs3"))
+               fs_type = "ntfs";
+
        sprintf(buf, "mkfs.%s >/dev/null 2>&1", fs_type);

        ret = tst_system(buf);
@@ -87,6 +91,9 @@ static enum tst_fs_impl has_kernel_support(const char *fs_type)
        char template[PATH_MAX];
        int ret;

+       if (!strcmp(fs_type, "ntfs"))
+               goto check_fuse;
+
        snprintf(template, sizeof(template), "%s/mountXXXXXX", tmpdir);
        if (!mkdtemp(template))
                tst_brk(TBROK | TERRNO, "mkdtemp(%s) failed", template);
@@ -102,6 +109,7 @@ static enum tst_fs_impl has_kernel_support(const char *fs_type)

        SAFE_RMDIR(template);

+check_fuse:
        if (tst_fs_in_skiplist(fs_type, fs_type_fuse_blacklist)) {
                tst_res(TINFO, "Skipping %s because of FUSE blacklist", fs_type);
                return TST_FS_UNSUPPORTED;


-- 
Cyril Hrubis
chrubis@suse.cz

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

  reply	other threads:[~2026-04-10 10:04 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-08 17:44 [LTP] [PATCH] syscalls: file_attr05: skip ntfs filesystem Matthew R. Ochs via ltp
2026-04-09  7:53 ` Petr Vorel
2026-04-09 22:55   ` Matt Ochs via ltp
2026-04-09  8:27 ` Cyril Hrubis
2026-04-09 22:51   ` Matt Ochs via ltp
2026-04-10 10:04     ` Cyril Hrubis [this message]
2026-04-10 16:42       ` Matt Ochs via ltp

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=adjLGwviRoTSsbgH@yuki.lan \
    --to=chrubis@suse.cz \
    --cc=ltp@lists.linux.it \
    --cc=mochs@nvidia.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox