Re: [PATCH v16 2/2] futex_cmp_requeue03: Add EFAULT error coverage test

Petr Vorel <[email protected]>
Newsgroups gmane.linux.ltp
Message-ID <20260703131911.GA407003@pevik>
Hi Michael,

...
> +static struct testcase {
> +	const char *desc;
> +	futex_t **uaddr;
> +	futex_t **uaddr2;
> +	int exp_errno;
> +} testcases[] = {
> +	{
> +		.desc = "uaddr unmapped",
> +		.uaddr = &unmapped_addr,
> +		.uaddr2 = &futex_ptr,
> +		.exp_errno = EFAULT,
> +	},
> +	{
> +		.desc = "uaddr2 unmapped",
> +		.uaddr = &futex_ptr,
> +		.uaddr2 = &unmapped_addr,
> +		.exp_errno = EFAULT,
> +	},
> +	{
> +		.desc = "uaddr PROT_NONE",
> +		.uaddr = &prot_none_addr,
> +		.uaddr2 = &futex_ptr,
> +		.exp_errno = EFAULT,
> +	},
> +	{
> +		.desc = "uaddr2 PROT_NONE",
> +		.uaddr = &futex_ptr,
> +		.uaddr2 = &prot_none_addr,
> +		.exp_errno = EFAULT,
> +	},
> +};
nit: also here I'd use EFAULT directly in TST_EXP_FAIL(), but that's a minor
detail.

The rest LGTM.
Reviewed-by: Petr Vorel <[email protected]>

Kind regards,
Petr


-- 
Mailing list info: https://lists.linux.it/listinfo/ltp
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.