<div dir="ltr"><div dir="ltr"><div class="gmail_default" style="font-size:small"><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Mar 17, 2021 at 6:51 PM Cyril Hrubis <<a href="mailto:chrubis@suse.cz">chrubis@suse.cz</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">The approach with flags we added for FUSE does not scale at all, we need<br>
a proper skiplist so that we can skip individual filesystems.<br>
<br>
The motivation here is the addition of tmpfs to the supported<br>
filesystems check. One of the problems there is that sync() is no-op on<br>
tmpfs and hence the syncfs test fails. After this patchset we can simply<br>
skip syncfs test on tmpfs by setting the right skiplist.<br>
<br>
As a bonus point the list of unsupported filesystem gets nicely<br>
propagated to the metadata as well.<br>
<br>
Signed-off-by: Cyril Hrubis <<a href="mailto:chrubis@suse.cz" target="_blank">chrubis@suse.cz</a>><br>
Signed-off-by: Martin Doucha <<a href="mailto:mdoucha@suse.cz" target="_blank">mdoucha@suse.cz</a>><br>
---<br>
 include/tst_fs.h                              | 25 +++++--<br>
 include/tst_test.h                            |  9 ++-<br>
 lib/tst_supported_fs_types.c                  | 66 +++++++++++++++----<br>
 lib/tst_test.c                                |  2 +-<br>
 .../kernel/syscalls/fsconfig/fsconfig01.c     |  2 +-<br>
 testcases/kernel/syscalls/fsmount/fsmount01.c |  2 +-<br>
 testcases/kernel/syscalls/fsmount/fsmount02.c |  2 +-<br>
 testcases/kernel/syscalls/fsopen/fsopen01.c   |  2 +-<br>
 testcases/kernel/syscalls/fspick/fspick01.c   |  2 +-<br>
 testcases/kernel/syscalls/fspick/fspick02.c   |  2 +-<br>
 .../kernel/syscalls/move_mount/move_mount01.c |  2 +-<br>
 .../kernel/syscalls/move_mount/move_mount02.c |  2 +-<br>
 .../kernel/syscalls/open_tree/open_tree01.c   |  2 +-<br>
 .../kernel/syscalls/open_tree/open_tree02.c   |  2 +-<br>
 .../sync_file_range/sync_file_range02.c       |  2 +-<br>
 testcases/lib/tst_supported_fs.c              |  4 +-<br>
 16 files changed, 93 insertions(+), 35 deletions(-)<br>
<br>
diff --git a/include/tst_fs.h b/include/tst_fs.h<br>
index cc5cc2c0c..6b1d800a1 100644<br>
--- a/include/tst_fs.h<br>
+++ b/include/tst_fs.h<br>
@@ -167,18 +167,33 @@ int tst_fill_file(const char *path, char pattern, size_t bs, size_t bcount);<br>
  */<br>
 int tst_prealloc_file(const char *path, size_t bs, size_t bcount);<br>
<br>
-#define TST_FS_SKIP_FUSE 0x01<br>
+enum tst_fs_type {<br>
+       TST_FS_UNSUPPORTED = 0,<br>
+       TST_FS_KERNEL = 1,<br>
+       TST_FS_FUSE = 2,<br>
+};<br></blockquote><div><br></div><div><div class="gmail_default" style="font-size:small">Do you think it necessary to rename 'enum tst_fs_type' to distinguish with 'fs_type'?</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">As it is quite similar to the 'fs_type*' series function and structure, that might mess up</div><div class="gmail_default" style="font-size:small">the code (we even have the same name function: tst_fs_type). So, I'd like to suggest </div><div class="gmail_default" style="font-size:small">use 'enum tst_fs_status' or 'enum tst_fs_item', or anything else.</div><br></div><div><div class="gmail_default" style="font-size:small">Anyway, the remaining part of the patchset looks good.</div></div></div><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div>Regards,<br></div><div>Li Wang<br></div></div></div></div>