From: Cyril Hrubis <chrubis@suse.cz>
To: Jan Polensky <japo@linux.ibm.com>
Cc: ltp@lists.linux.it
Subject: Re: [LTP] [RFC PATCH v1 2/2] statmount06.c: Fix incorrect fs_type assumption NTFS->FUSEBLK
Date: Wed, 21 May 2025 11:45:31 +0200 [thread overview]
Message-ID: <aC2gu5sCY8cc2PPL@rei> (raw)
In-Reply-To: <20250513165640.185122-3-japo@linux.ibm.com>
Hi!
> The test incorrectly assumed that a volume mounted with "fuseblk" would report
> its fs_type as "ntfs" via statmount, which contradicts the actual mount options
> used and the resulting fs_type "fuseblk".
>
> Old behavior:
>
> sudo LTP_SINGLE_FS_TYPE=ntfs strace -e trace=mount,statmount -o log.log -s 128 -f ./statmount06
> ...
> statmount06.c:42: TFAIL: st_mount->str + st_mount->fs_type (fuseblk) != tst_device->fs_type (ntfs)
> ...
This may be a bug in the LTP_SINGLE_FS_TYPE, because the test has
.skip_filesystems = {"fuse", NULL} in the tst_test structure, which
means that the test is not supposed to run on fuse.
> Signed-off-by: Jan Polensky <japo@linux.ibm.com>
> ---
> testcases/kernel/syscalls/statmount/statmount06.c | 8 +++++++-
> 1 file changed, 7 insertions(+), 1 deletion(-)
>
> diff --git a/testcases/kernel/syscalls/statmount/statmount06.c b/testcases/kernel/syscalls/statmount/statmount06.c
> index fe41d5b87e7f..dedf9bba14f9 100644
> --- a/testcases/kernel/syscalls/statmount/statmount06.c
> +++ b/testcases/kernel/syscalls/statmount/statmount06.c
> @@ -28,6 +28,8 @@ static struct statmount *st_mount;
>
> static void run(void)
> {
> + const char *expected_fs_type;
> +
> memset(st_mount, 0, SM_SIZE);
>
> TST_EXP_PASS(statmount(root_id, STATMOUNT_FS_TYPE, st_mount,
> @@ -37,7 +39,11 @@ static void run(void)
> return;
>
> TST_EXP_EQ_LI(st_mount->mask, STATMOUNT_FS_TYPE);
> - TST_EXP_EQ_STR(st_mount->str + st_mount->fs_type, tst_device->fs_type);
> + if (!strcmp(tst_device->fs_type, "ntfs"))
> + expected_fs_type = "fuseblk";
> + else
> + expected_fs_type = tst_device->fs_type;
> + TST_EXP_EQ_STR(st_mount->str + st_mount->fs_type, expected_fs_type);
And this does not really work, since there is in-kernel ntfs driver as
well and in newer kernels it has supposedly read-write support too.
I guess that if we wanted to enable the test on fuse, we would have to
base this on check if the fs has been mounted by fuse. Maybe we need a
tst_is_fuse() function that would possibly parse /proc/mount or
something along that way.
--
Cyril Hrubis
chrubis@suse.cz
--
Mailing list info: https://lists.linux.it/listinfo/ltp
prev parent reply other threads:[~2025-05-21 9:46 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-13 16:56 [LTP] [RFC PATCH v1 0/2] Fix NTFS-related failures in statmount02 and Jan Polensky
2025-05-13 16:56 ` [LTP] [RFC PATCH v1 1/2] safe_macros.c: Fix missing ro flag for FUSE NTFS mounts Jan Polensky
2025-05-15 19:48 ` Petr Vorel
2025-05-16 6:26 ` Li Wang via ltp
2025-05-21 9:37 ` Cyril Hrubis
2025-05-21 9:55 ` Cyril Hrubis
2025-06-04 11:59 ` Cyril Hrubis
2025-05-13 16:56 ` [LTP] [RFC PATCH v1 2/2] statmount06.c: Fix incorrect fs_type assumption NTFS->FUSEBLK Jan Polensky
2025-05-21 9:45 ` Cyril Hrubis [this message]
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=aC2gu5sCY8cc2PPL@rei \
--to=chrubis@suse.cz \
--cc=japo@linux.ibm.com \
--cc=ltp@lists.linux.it \
/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