[LTP] [PATCH v3 2/2] setxattr02: Adapt test for kernel 7.1.0+ socket xattr support
Jan Polensky
japo@linux.ibm.com
Wed Mar 18 11:53:44 CET 2026
Hi Petr and Andrea,
> Hi Andrea,
>
> > Hi!
>
> > Sorry for jumping in a bit late, but...
>
> > > +static bool socket_xattr_supported;
> > > +
> > > struct test_case {
> > > char *key;
> > > @@ -57,7 +60,16 @@ struct test_case {
> > > int flags;
> > > int exp_err;
> > > int needskeyset;
> > > + void (*fix_errno)(struct test_case *tc);
>
> > Honestly I would have preferred a bool flag here instead of a function.
> > The code would have been more readable as:
>
> > static void verify_setxattr(unsigned int i)
> > {
> > ..
> > if (tc[i].check_xattr && socket_xattr_supported)
> > tc->exp_err = 0;
> > ..
> > }
>
> > And only 1 testcase would have been touched with `.check_xattr = 1`.
>
> OK, this is slightly simpler.
>
[snip]
Yes, it's simpler. The `make check` command is a good thing, thanks for
pointing it out. I see what you mean.
I'll send v4 soon.
Kind regards,
Jan
More information about the ltp
mailing list