[LTP] [PATCH] tst_supported_fs: Implement checking paths against skiplist

Li Wang liwang@redhat.com
Thu Sep 22 11:08:40 CEST 2022


On Thu, Sep 22, 2022 at 4:44 PM Petr Vorel <pvorel@suse.cz> wrote:

> > On 22. 09. 22 6:16, Li Wang wrote:
> > >                      if (skiplist) {
> > >     -                       if (tst_fs_in_skiplist(argv[optind],
> (const char * const*)skiplist))
> > >     -                               tst_brk(TCONF, "%s is skipped",
> argv[optind]);
> > >     +                       if (tst_fs_in_skiplist(fsname, (const char
> * const*)skiplist))
> > >     +                               tst_brk(TCONF, "%s is skipped",
> fsname);
>
>
> > > TCONF does not means return 1, we might need explicitly 'return 1'
> here.
>
> > Yes, but that's a problem which already existed before my patch and
> affects
> > the other single-FS checks as well. The fix should go into a separate
> patch
> > after release.
>
> Yes, that's not related. I changed it in eb47b4497 ("tst_supported_fs:
> Support
> skip list when query single fs") as with 32 one can detect it's TCONF.
> As long as 0 is success, non-zero for failure.
>

Looks like there is no difference to use whatever 32 or 1, as long as
it's a non-zero, it will work well in the shell.

Ok, I agree to update the doc (also usage() should be updated) later.

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



> But I forget to update doc.
>
> Thus I'll wait for feedback from others whether we should get back to 1 as
> error
> (thus use TINFO) or update doc to mention to exit 32 (or more generally
> non-zero
> exit).
> very nit: I'd use exit instead of return in docs.
>
> Kind regards,
> Petr
>
>

-- 
Regards,
Li Wang
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linux.it/pipermail/ltp/attachments/20220922/381828de/attachment-0001.htm>


More information about the ltp mailing list