Skip to content

Commit

Permalink
test/sqpoll-sleep: use coarser time for sleep checking
Browse files Browse the repository at this point in the history
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: #1207
Signed-off-by: Jens Axboe <axboe@kernel.dk>
  • Loading branch information
axboe committed Oct 31, 2024
1 parent 99a09d9 commit 3fd36a9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/sqpoll-sleep.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -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);
Expand Down

0 comments on commit 3fd36a9

Please sign in to comment.