[LTP] futex_wait06: Add EFAULT error coverage test

linuxtestproject.agent@gmail.com linuxtestproject.agent@gmail.com
Mon May 25 21:45:10 CEST 2026


Hi Michael,

On Mon, 25 May 2026, Michael Menasherov wrote:
> futex_wait06: Add EFAULT error coverage test

[...]

> --- a/runtest/syscalls
> +++ b/runtest/syscalls
> @@ -1876,6 +1877,9 @@ futex_wake04 futex_wake04
>  futex_wait_bitset01 futex_wait_bitset01
> +futex_wait06 futex_wait06
> +futex_wait07 futex_wait07
> +futex_wake05 futex_wake05

futex_wait06 and futex_wait07 should be inserted after futex_wait05
(before futex_waitv01), and futex_wake05 should follow futex_wake04
(before futex_wait_bitset01). All three are currently appended at the
wrong position.

[...]

--- [PATCH 4/4] futex_cmp_requeue03 ---

> +futex_cmp_requeue03 futex_cmp_requeue03

Placement is correct here.

> +static futex_t futex_var = FUTEX_INITIALIZER;
> +static futex_t *futex_ptr = &futex_var;

> +	TST_EXP_FAIL(futex_cmp_requeue(tv->fntype, *tc->uaddr, futex_var,
> +		*tc->uaddr2, 1, 1, 0), tc->exp_errno, "%s", tc->desc);

For the "uaddr2 unmapped" case the call path reaches the uaddr2 key
lookup only after verifying *uaddr == val. Since both futex_var and val
are FUTEX_INITIALIZER (0), the comparison passes and EFAULT is returned
on the uaddr2 page resolution — as intended. No issue, just noting the
dependency for readers.

---
Summary: fix the runtest insertion points for futex_wait06, futex_wait07,
and futex_wake05 before resubmitting.

---
Note:

Our agent completed the review of the patch. The full review can be
found at: (REVIEW_URL not set)

The agent can sometimes produce false positives although often its
findings are genuine. If you find issues with the review, please
comment this email or ignore the suggestions.

Regards,
LTP AI Reviewer


More information about the ltp mailing list