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

Li Wang
2022-09-22T09:09:11Z

[-- Attachment #1.1: Type: text/plain, Size: 1559 bytes --]

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

[-- Attachment #1.2: Type: text/html, Size: 2822 bytes --]

[-- Attachment #2: Type: text/plain, Size: 60 bytes --]