[LTP] [PATCH v4] lib: LTP_SINGLE_FS_TYPE and LTP_FORCE_SINGLE_FS_TYPE

Li Wang liwang@redhat.com
Tue May 27 11:07:36 CEST 2025


Petr Vorel <pvorel@suse.cz> wrote:

> > -     skip_fuse = tst_fs_in_skiplist("fuse", skiplist);
> >       only_fs = getenv("LTP_SINGLE_FS_TYPE");
> > +     force_only_fs = getenv("LTP_FORCE_SINGLE_FS_TYPE");
> > +
> > +     if (only_fs && force_only_fs) {
> > +             tst_brk(TBROK,
> > +                     "Only one of LTP_SINGLE_FS_TYPE and LTP_FORCE_SINGLE_FS_TYPE can be set");
> > +             return NULL;
> > +     }
> > +
> > +     skip_fuse = tst_fs_in_skiplist("fuse", skiplist);
>
> >       if (only_fs) {
> >               tst_res(TINFO, "WARNING: testing only %s", only_fs);
> > -             if (tst_fs_is_supported(only_fs))
> > +             if (fs_could_be_used(only_fs, skiplist, skip_fuse))
> >                       fs_types[0] = only_fs;

One more thing I'm a bit hesitant about, do we need to explicitly set
fs_types[1] to NULL here?

> >               return fs_types;
> >       }
>
> > -     for (i = 0; fs_type_whitelist[i]; i++) {
> > -             if (tst_fs_in_skiplist(fs_type_whitelist[i], skiplist)) {
> > -                     tst_res(TINFO, "Skipping %s as requested by the test",
> > -                             fs_type_whitelist[i]);
> > -                     continue;
> > -             }
> > -
> > -             sup = tst_fs_is_supported(fs_type_whitelist[i]);
> > -
> > -             if (skip_fuse && sup == TST_FS_FUSE) {
> > -                     tst_res(TINFO,
> > -                             "Skipping FUSE based %s as requested by the test",
> > -                             fs_type_whitelist[i]);
> > -                     continue;
> > -             }
> > +     if (force_only_fs) {
> > +             tst_res(TINFO, "WARNING: force testing only %s", force_only_fs);
> > +             fs_types[0] = force_only_fs;

fs_type[1] = NULL; ?

-- 
Regards,
Li Wang



More information about the ltp mailing list