From 3fd36a9946b8f6c5583f9d469bd22472abd17855 Mon Sep 17 00:00:00 2001 From: Jens Axboe Date: Wed, 30 Oct 2024 18:57:27 -0600 Subject: [PATCH] test/sqpoll-sleep: use coarser time for sleep checking 100 usec / 1 ms is a bit short, make it 100x larger in the hopes that it'll fix the test case on some boxes. Link: https://github.com/axboe/liburing/issues/1207 Signed-off-by: Jens Axboe --- test/sqpoll-sleep.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/sqpoll-sleep.c b/test/sqpoll-sleep.c index 5cf4210aa..2f1ead2c0 100644 --- a/test/sqpoll-sleep.c +++ b/test/sqpoll-sleep.c @@ -22,7 +22,7 @@ int main(int argc, char *argv[]) return 0; p.flags = IORING_SETUP_SQPOLL; - p.sq_thread_idle = 100; + p.sq_thread_idle = 10000; ret = io_uring_queue_init_params(1, &ring, &p); if (ret) { @@ -36,7 +36,7 @@ int main(int argc, char *argv[]) gettimeofday(&tv, NULL); do { - usleep(1000); + usleep(100000); if ((*ring.sq.kflags) & IORING_SQ_NEED_WAKEUP) return 0; } while (mtime_since_now(&tv) < 1000);