public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
* [LTP] [PATCH 1/1] tst_supported_fs_types: Disable FUSE bcachefs
@ 2024-01-18  9:00 Petr Vorel
  2024-01-18  9:05 ` Li Wang
  2024-01-18 10:05 ` Cyril Hrubis
  0 siblings, 2 replies; 4+ messages in thread
From: Petr Vorel @ 2024-01-18  9:00 UTC (permalink / raw)
  To: ltp; +Cc: Kent Overstreet, linux-bcachefs, Brian Foster, fstests

bcachefs got into the kernel in 6.7 therefore it's not much useful for
testing FUSE version.

NOTE: The original purpose for this was a failure with bcachefs-tools on
kernel without bcachefs support (e.g. kernel < 6.7):

    # LTP_SINGLE_FS_TYPE=bcachefs ./chdir01
    ...
    tst_supported_fs_types.c:57: TINFO: mkfs.bcachefs does exist
    tst_test.c:1669: TINFO: === Testing on bcachefs ===
    tst_test.c:1117: TINFO: Formatting /dev/loop0 with bcachefs opts=''
    extra opts=''
    tst_test.c:1131: TINFO: Mounting /dev/loop0 to
    /tmp/LTP_chdwqhGtZ/mntpoint fstyp=bcachefs flags=0
    tst_test.c:1131: TBROK: mount(/dev/loop0, mntpoint, bcachefs, 0, (nil))
    failed: ENODEV (19)

Suggested-by: Cyril Hrubis <chrubis@suse.cz>
Signed-off-by: Petr Vorel <pvorel@suse.cz>
---
 lib/tst_supported_fs_types.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/lib/tst_supported_fs_types.c b/lib/tst_supported_fs_types.c
index 369836717..bbbb8df19 100644
--- a/lib/tst_supported_fs_types.c
+++ b/lib/tst_supported_fs_types.c
@@ -33,6 +33,11 @@ static const char *const fs_type_whitelist[] = {
 	NULL
 };
 
+static const char *const fs_type_fuse_blacklist[] = {
+	"bcachefs",
+	NULL,
+};
+
 static const char *fs_types[ARRAY_SIZE(fs_type_whitelist)];
 
 static int has_mkfs(const char *fs_type)
@@ -96,6 +101,11 @@ static enum tst_fs_impl has_kernel_support(const char *fs_type)
 
 	SAFE_RMDIR(template);
 
+	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;
+	}
+
 	/* Is FUSE supported by kernel? */
 	if (fuse_supported == -1) {
 		ret = open("/dev/fuse", O_RDWR);
-- 
2.43.0


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

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

* Re: [LTP] [PATCH 1/1] tst_supported_fs_types: Disable FUSE bcachefs
  2024-01-18  9:00 [LTP] [PATCH 1/1] tst_supported_fs_types: Disable FUSE bcachefs Petr Vorel
@ 2024-01-18  9:05 ` Li Wang
  2024-01-18 10:05 ` Cyril Hrubis
  1 sibling, 0 replies; 4+ messages in thread
From: Li Wang @ 2024-01-18  9:05 UTC (permalink / raw)
  To: Petr Vorel; +Cc: Brian Foster, Kent Overstreet, fstests, linux-bcachefs, ltp

On Thu, Jan 18, 2024 at 5:00 PM Petr Vorel <pvorel@suse.cz> wrote:

> bcachefs got into the kernel in 6.7 therefore it's not much useful for
> testing FUSE version.
>
> NOTE: The original purpose for this was a failure with bcachefs-tools on
> kernel without bcachefs support (e.g. kernel < 6.7):
>
>     # LTP_SINGLE_FS_TYPE=bcachefs ./chdir01
>     ...
>     tst_supported_fs_types.c:57: TINFO: mkfs.bcachefs does exist
>     tst_test.c:1669: TINFO: === Testing on bcachefs ===
>     tst_test.c:1117: TINFO: Formatting /dev/loop0 with bcachefs opts=''
>     extra opts=''
>     tst_test.c:1131: TINFO: Mounting /dev/loop0 to
>     /tmp/LTP_chdwqhGtZ/mntpoint fstyp=bcachefs flags=0
>     tst_test.c:1131: TBROK: mount(/dev/loop0, mntpoint, bcachefs, 0, (nil))
>     failed: ENODEV (19)
>
> Suggested-by: Cyril Hrubis <chrubis@suse.cz>
> Signed-off-by: Petr Vorel <pvorel@suse.cz>
>

Reviewed-by: Li Wang <liwang@redhat.com>

---
>  lib/tst_supported_fs_types.c | 10 ++++++++++
>  1 file changed, 10 insertions(+)
>
> diff --git a/lib/tst_supported_fs_types.c b/lib/tst_supported_fs_types.c
> index 369836717..bbbb8df19 100644
> --- a/lib/tst_supported_fs_types.c
> +++ b/lib/tst_supported_fs_types.c
> @@ -33,6 +33,11 @@ static const char *const fs_type_whitelist[] = {
>         NULL
>  };
>
> +static const char *const fs_type_fuse_blacklist[] = {
> +       "bcachefs",
> +       NULL,
> +};
> +
>  static const char *fs_types[ARRAY_SIZE(fs_type_whitelist)];
>
>  static int has_mkfs(const char *fs_type)
> @@ -96,6 +101,11 @@ static enum tst_fs_impl has_kernel_support(const char
> *fs_type)
>
>         SAFE_RMDIR(template);
>
> +       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;
> +       }
> +
>         /* Is FUSE supported by kernel? */
>         if (fuse_supported == -1) {
>                 ret = open("/dev/fuse", O_RDWR);
> --
> 2.43.0
>
>

-- 
Regards,
Li Wang

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

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

* Re: [LTP] [PATCH 1/1] tst_supported_fs_types: Disable FUSE bcachefs
  2024-01-18  9:00 [LTP] [PATCH 1/1] tst_supported_fs_types: Disable FUSE bcachefs Petr Vorel
  2024-01-18  9:05 ` Li Wang
@ 2024-01-18 10:05 ` Cyril Hrubis
  2024-01-18 10:23   ` Petr Vorel
  1 sibling, 1 reply; 4+ messages in thread
From: Cyril Hrubis @ 2024-01-18 10:05 UTC (permalink / raw)
  To: Petr Vorel; +Cc: Kent Overstreet, Brian Foster, fstests, linux-bcachefs, ltp

Hi!
Reviewed-by: Cyril Hrubis <chrubis@suse.cz>

-- 
Cyril Hrubis
chrubis@suse.cz

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

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

* Re: [LTP] [PATCH 1/1] tst_supported_fs_types: Disable FUSE bcachefs
  2024-01-18 10:05 ` Cyril Hrubis
@ 2024-01-18 10:23   ` Petr Vorel
  0 siblings, 0 replies; 4+ messages in thread
From: Petr Vorel @ 2024-01-18 10:23 UTC (permalink / raw)
  To: Cyril Hrubis; +Cc: Kent Overstreet, Brian Foster, fstests, linux-bcachefs, ltp

Hi Li, Cyril,

thanks, merged.

Kind regards,
Petr

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

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

end of thread, other threads:[~2024-01-18 10:23 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-01-18  9:00 [LTP] [PATCH 1/1] tst_supported_fs_types: Disable FUSE bcachefs Petr Vorel
2024-01-18  9:05 ` Li Wang
2024-01-18 10:05 ` Cyril Hrubis
2024-01-18 10:23   ` Petr Vorel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox