[LTP] [PATCH v3 1/2] fsetxattr02: Adapt test for kernel 7.1.0+ socket xattr support
Jan Polensky
japo@linux.ibm.com
Fri Mar 20 10:30:22 CET 2026
Hi Andrea:
> Hi!
>
> > +static void fix_sock(struct test_case *tc)
> > +{
> > + /* dc0876b9846d ("xattr: support extended attributes on sockets") */
> > + if (socket_xattr_supported)
> > + tc->exp_err = 0;
>
> There's a mix of `bool` and `int` here. I would just define tc->exp_err as `int`
> and leave `bool` out of the test for consistency.
>
> Also I was thinking that we shouldn't explicitly edit static variables meant
> to describe the test scenario, so we probably need a local variable (also for
> consistency).
>
> int exp_err = tc->exp_err;
>
> if (socket_xattr_supported)
> exp_err = 1;
>
> I can add these two small things before merge if you agree with that.
Yes, please! And thank you very much!
>
> Regards,
> --
> Andrea Cervesato
> SUSE QE Automation Engineer Linux
> andrea.cervesato@suse.com
More information about the ltp
mailing list