Linux Test Project
 help / color / mirror / Atom feed
* [LTP] [PATCH] epoll_wait04: Use tst_multiply_timeout()
@ 2026-09-28 15:30 Florian Schmaus via ltp
  2026-09-28 18:38 ` [LTP] " linuxtestproject.agent
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Florian Schmaus via ltp @ 2026-09-28 15:30 UTC (permalink / raw)
  To: ltp

On slow or emulated systems, epoll_wait04 can produce false positives
like:

epoll_wait04.c:36: TFAIL: epoll_wait() waited for 1106us with a timeout equal to zero

Avoid this by scaling the scheduling delay threshold with
tst_multiply_timeout(), which respects LTP_TIMEOUT_MUL and slow kernel
configurations.

Signed-off-by: Florian Schmaus <florian.schmaus@codasip.com>
---
 testcases/kernel/syscalls/epoll_wait/epoll_wait04.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/testcases/kernel/syscalls/epoll_wait/epoll_wait04.c b/testcases/kernel/syscalls/epoll_wait/epoll_wait04.c
index 5c4a545471b2..74af77a6fb19 100644
--- a/testcases/kernel/syscalls/epoll_wait/epoll_wait04.c
+++ b/testcases/kernel/syscalls/epoll_wait/epoll_wait04.c
@@ -29,7 +29,7 @@ static void run(void)
 	if (TST_RET != 0)
 		tst_res(TFAIL | TTERRNO, "epoll_wait() returned %li", TST_RET);
 
-	if (tst_timer_elapsed_us() <= USEC_PRECISION)
+	if (tst_timer_elapsed_us() <= tst_multiply_timeout(USEC_PRECISION))
 		tst_res(TPASS, "epoll_wait() returns immediately with a timeout equal to zero");
 	else
 		tst_res(TFAIL, "epoll_wait() waited for %llius with a timeout equal to zero",
-- 
2.55.0


-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [LTP] epoll_wait04: Use tst_multiply_timeout()
  2026-09-28 15:30 [LTP] [PATCH] epoll_wait04: Use tst_multiply_timeout() Florian Schmaus via ltp
@ 2026-09-28 18:38 ` linuxtestproject.agent
  2026-10-05 13:16 ` [LTP] [PATCH] " Andrea Cervesato via ltp
  2026-10-05 13:16 ` Andrea Cervesato via ltp
  2 siblings, 0 replies; 4+ messages in thread
From: linuxtestproject.agent @ 2026-09-28 18:38 UTC (permalink / raw)
  To: Florian Schmaus; +Cc: ltp

Hi Florian,

On Mon Sep 28 17:30:58 2026 +0200, Florian Schmaus wrote:
> epoll_wait04: Use tst_multiply_timeout()

Verdict - Reviewed

---
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

-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [LTP] [PATCH] epoll_wait04: Use tst_multiply_timeout()
  2026-09-28 15:30 [LTP] [PATCH] epoll_wait04: Use tst_multiply_timeout() Florian Schmaus via ltp
  2026-09-28 18:38 ` [LTP] " linuxtestproject.agent
@ 2026-10-05 13:16 ` Andrea Cervesato via ltp
  2026-10-05 13:16 ` Andrea Cervesato via ltp
  2 siblings, 0 replies; 4+ messages in thread
From: Andrea Cervesato via ltp @ 2026-10-05 13:16 UTC (permalink / raw)
  To: Florian Schmaus; +Cc: ltp

Reviewed-by: Andrea Cervesato <andrea.cervesato@suse.com>

--
Andrea Cervesato
SUSE QE Automation Engineer Linux
andrea.cervesato@suse.com

-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [LTP] [PATCH] epoll_wait04: Use tst_multiply_timeout()
  2026-09-28 15:30 [LTP] [PATCH] epoll_wait04: Use tst_multiply_timeout() Florian Schmaus via ltp
  2026-09-28 18:38 ` [LTP] " linuxtestproject.agent
  2026-10-05 13:16 ` [LTP] [PATCH] " Andrea Cervesato via ltp
@ 2026-10-05 13:16 ` Andrea Cervesato via ltp
  2 siblings, 0 replies; 4+ messages in thread
From: Andrea Cervesato via ltp @ 2026-10-05 13:16 UTC (permalink / raw)
  To: Florian Schmaus; +Cc: ltp

Merged, Thanks!

--
Andrea Cervesato
SUSE QE Automation Engineer Linux
andrea.cervesato@suse.com

-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2026-10-05 13:17 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-28 15:30 [LTP] [PATCH] epoll_wait04: Use tst_multiply_timeout() Florian Schmaus via ltp
2026-09-28 18:38 ` [LTP] " linuxtestproject.agent
2026-10-05 13:16 ` [LTP] [PATCH] " Andrea Cervesato via ltp
2026-10-05 13:16 ` Andrea Cervesato via ltp

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox