Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

selftests/futex: futex_waitv wouldblock test should fail

Testcase should fail if -EWOULDBLOCK is not returned when expected value
differs from actual value from the waiter.

Link: https://lore.kernel.org/r/20250404221225.1596324-1-edliaw@google.com
Fixes: 9d57f7c79748920636f8293d2f01192d702fe390 ("selftests: futex: Test sys_futex_waitv() wouldblock")
Signed-off-by: Edward Liaw <edliaw@google.com>
Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: André Almeida <andrealmeid@igalia.com>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>

authored by

Edward Liaw and committed by
Shuah Khan
7d50e00f 170ec119

+1 -1
+1 -1
tools/testing/selftests/futex/functional/futex_wait_wouldblock.c
··· 98 98 info("Calling futex_waitv on f1: %u @ %p with val=%u\n", f1, &f1, f1+1); 99 99 res = futex_waitv(&waitv, 1, 0, &to, CLOCK_MONOTONIC); 100 100 if (!res || errno != EWOULDBLOCK) { 101 - ksft_test_result_pass("futex_waitv returned: %d %s\n", 101 + ksft_test_result_fail("futex_waitv returned: %d %s\n", 102 102 res ? errno : res, 103 103 res ? strerror(errno) : ""); 104 104 ret = RET_FAIL;