Skip to contentSkip to conversation

selftests/futex: futex_waitv wouldblock test should fail

PATCH In review Edward Liaw 4 participants 4 messages Apr 4, 2025 – Apr 8, 2025

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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.

Fixes 9d57f7c79748920636f8293d2f01192d702fe390 ("selftests: futex: Test sys_futex_waitv() wouldblock")
---
 .../testing/selftests/futex/functional/futex_wait_wouldblock.c  | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tools/testing/selftests/futex/functional/futex_wait_wouldblock.c +1 -1
index 7d7a6a06cdb7..2d8230da9064 100644
@@ -98,7 +98,7 @@ int main(int argc, char *argv[])
 	info("Calling futex_waitv on f1: %u @ %p with val=%u\n", f1, &f1, f1+1);
 	res = futex_waitv(&waitv, 1, 0, &to, CLOCK_MONOTONIC);
 	if (!res || errno != EWOULDBLOCK) {
-		ksft_test_result_pass("futex_waitv returned: %d %s\n",
+		ksft_test_result_fail("futex_waitv returned: %d %s\n",
 				      res ? errno : res,
 				      res ? strerror(errno) : "");
 		ret = RET_FAIL;
Signature · 1 line
2.49.0.504.g3bcea36a83-goog
maintainer
#3 lore raw
Quoted 11 lines · André Almeida

Thank you Edward,

Em 04/04/2025 19:12, Edward Liaw escreveu:

Quoted 5 lines

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

Fixes 9d57f7c79748920636f8293d2f01192d702fe390 ("selftests: futex: Test sys_futex_waitv() wouldblock")

Thank you. Applied for Linux 6.15-rc2

https://web.git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest.git/log/?h=fixes

thanks,
-- Shuah