public inbox for [email protected]
 help / color / mirror / Atom feed
* [PATCH liburing 1/1] tests: don't sleep too much for rsrc tags
@ 2022-03-17 14:35 Pavel Begunkov
  2022-03-17 15:00 ` Jens Axboe
  0 siblings, 1 reply; 2+ messages in thread
From: Pavel Begunkov @ 2022-03-17 14:35 UTC (permalink / raw)
  To: io-uring; +Cc: Jens Axboe, asml.silence

check_cq_empty() sleeps for a second, and it's called many times
throughout the test. It's too much, reduced it to 1ms. Even if there is
a false negative, we don't care and next check_cq_empty() will fail.

Signed-off-by: Pavel Begunkov <[email protected]>
---
 test/rsrc_tags.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/test/rsrc_tags.c b/test/rsrc_tags.c
index f441b5c..2d11d2a 100644
--- a/test/rsrc_tags.c
+++ b/test/rsrc_tags.c
@@ -27,7 +27,7 @@ static bool check_cq_empty(struct io_uring *ring)
 	struct io_uring_cqe *cqe = NULL;
 	int ret;
 
-	sleep(1); /* doesn't happen immediately, so wait */
+	usleep(1000); /* doesn't happen immediately, so wait */
 	ret = io_uring_peek_cqe(ring, &cqe); /* nothing should be there */
 	return ret == -EAGAIN;
 }
-- 
2.35.1


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

end of thread, other threads:[~2022-03-17 15:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-03-17 14:35 [PATCH liburing 1/1] tests: don't sleep too much for rsrc tags Pavel Begunkov
2022-03-17 15:00 ` Jens Axboe

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