[LTP] futex_wait06: Add EFAULT error coverage test

linuxtestproject.agent@gmail.com linuxtestproject.agent@gmail.com
Tue May 26 23:00:43 CEST 2026


Hi Michael,

On Tue, 26 May 2026 22:04:27 +0300, Michael Menasherov wrote:
> futex_wait06: Add EFAULT error coverage test

--- [PATCH 1/4] futex_wait06: Add EFAULT error coverage test ---

> diff --git a/runtest/syscalls b/runtest/syscalls
> [...]
> +futex_cmp_requeue03 futex_cmp_requeue03
> [...]
> +futex_wait07 futex_wait07
> [...]
> +futex_wake05 futex_wake05

The runtest entries for futex_wait07, futex_wake05, and
futex_cmp_requeue03 belong in the commits that introduce those tests,
not here. As-is, if the first commit is applied alone (e.g. during
bisect) the runtest file references binaries that don't exist yet.

--- [PATCH 3/4] futex_wake05: Add EFAULT error coverage test ---

> +#include <sys/mman.h>
> +#include "futextest.h"

Missing blank line between system and local includes.

--- [PATCH 4/4] futex_cmp_requeue03: Add EFAULT error coverage test ---

> + * uaddr2 is only reached after *uaddr == val passes; both are
> + * FUTEX_INITIALIZER so the comparison succeeds.

This is inaccurate. The kernel calls get_futex_key() for both uaddr
and uaddr2 before performing the *uaddr == val comparison, so uaddr2
is validated regardless of the comparison outcome. The test still
works correctly since futex_var == FUTEX_INITIALIZER == val, but the
comment should be fixed.

---
Note:

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