[LTP] [PATCH v3 2/2] setxattr02: Adapt test for kernel 7.1.0+ socket xattr support
Petr Vorel
pvorel@suse.cz
Wed Mar 18 00:01:37 CET 2026
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.
> Also, please, always run `make check` before sending the patch. There are a
> couple of issues to fix in the test description.
> Same for the other patch.
I wonder what error you mean. Modified tests are ok:
$ make check-setxattr02
CHECK testcases/kernel/syscalls/setxattr/setxattr02.c
$ make check-fsetxattr02
CHECK testcases/kernel/syscalls/fsetxattr/fsetxattr02.c
Also, I'm not aware that make check would check test description
(I guess it'd be part of checkpatch.pl check, but still no idea).
Kind regards,
Petr
> Regards,
More information about the ltp
mailing list