[LTP] [PATCH v3 2/2] setxattr02: Adapt test for kernel 7.1.0+ socket xattr support

Andrea Cervesato andrea.cervesato@suse.com
Tue Mar 17 14:00:10 CET 2026


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`.

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.

Regards,
--
Andrea Cervesato
SUSE QE Automation Engineer Linux
andrea.cervesato@suse.com


More information about the ltp mailing list