epoll_wait04: Use tst_multiply_timeout()
PATCH 1/1 epoll_wait04: Use tst_multiply_timeout()
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.
--- testcases/kernel/syscalls/epoll_wait/epoll_wait04.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
testcases/kernel/syscalls/epoll_wait/epoll_wait04.c +1 -1
@@ -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",
Signature · 5 lines
2.55.0 -- Mailing list info: https://lists.linux.it/listinfo/ltp
Hi Florian,
Quoted 1 line · Florian Schmaus
epoll_wait04: Usetst_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
Signature · 1 line
Mailing list info: https://lists.linux.it/listinfo/ltp
--
Andrea Cervesato
SUSE QE Automation Engineer Linux
[email protected]
Signature · 1 line
Mailing list info: https://lists.linux.it/listinfo/ltp
Andrea Cervesato via ltp
AppliedMerged, Thanks!
--
Andrea Cervesato
SUSE QE Automation Engineer Linux
[email protected]
Signature · 1 line
Mailing list info: https://lists.linux.it/listinfo/ltp